Example #1
0
        static void Main(string[] args)
        {
            RevOAuthApp.Common.Configuration.RevOAuthConfigurationSection _config = RevOAuthApp.Common.Configuration.RevOAuthConfigurationSection.GetConfig();
            _webURL = _config.Url;

            if (args == null || args.Length == 0)
            {
                RunWindowsService();
            }
            else if (args[0] == "/console")
            {
                RunConsole();
            }
            else if (args[0] == "/deploy" && args.Length == 2 && args[1] != "")
            {
                //Deploy(args[1]);
            }
            else if (args[0] == "/install")
            {
                InstallService();
            }
            else if (args[0] == "/uninstall")
            {
                UninstallService();
            }
            else
            {
                Console.WriteLine("Unrecognized argument(s)");
            }
            Console.ReadLine();
        }
Example #2
0
        private void onStart()
        {
            //var config = new HostConfiguration()
            //{
            //    UrlReservations = new UrlReservations() { CreateAutomatically = true }
            //};

            //_host = new Nancy.Hosting.Self.NancyHost(config, new Uri(_config.Url));
            //_host.Start();
            RevOAuthApp.Common.Configuration.RevOAuthConfigurationSection _config = RevOAuthApp.Common.Configuration.RevOAuthConfigurationSection.GetConfig();
            var _webURL = _config.Url;

            _webApp = WebApp.Start <Startup>(_webURL);
        }