Exemplo n.º 1
0
 public static void Main(string[] args)
 {
     //Console.WriteLine("Starting REST API server on port " + 12);
     using (var server = new Grapevine.Server.RestServer())
     {
         server.LogToConsole().Start();
         Console.ReadLine();
         server.Stop();
     }
 }
Exemplo n.º 2
0
        public RestServer()
        {
            var appdir     = System.AppDomain.CurrentDomain.BaseDirectory;
            var publicPath = System.IO.Path.Combine(new string[] { appdir, "webapp" });

            _server              = new Grapevine.Server.RestServer();
            _server.Host         = "+";
            _server.Port         = Port.ToString();
            _server.PublicFolder = new Grapevine.Server.PublicFolder(publicPath);
            if (Program.IsDebug)
            {
                _server.LogToConsole();
            }
        }