static void Main(string[] args) { using (var host = new NancyHost(new NancyBootstrapper(), new Uri(@"http://localhost:1234"))) { host.Start(); Console.ReadLine(); } }
static void Main(string[] args) { var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/")); nancyHost.Start(); Console.WriteLine("Nancy now listening - navigate to http://localhost:8888/nancy/. Press enter to stop"); Console.ReadKey(); nancyHost.Stop(); Console.WriteLine("Stopped. Good bye!"); }
public static void Main() { using (var nancyHost = new NancyHost(new Uri("http://localhost:8888/"))) { nancyHost.Start(); Console.WriteLine("Nancy now listening - navigating to http://localhost:8888/. Press enter to stop"); Process.Start("http://localhost:8888/"); Console.ReadKey(); } }
public void Start() { nancyHost = new NancyHost(bootstrapper, new HostConfiguration { UrlReservations = new UrlReservations { CreateAutomatically = true }, }, new Uri("http://localhost:9999")); nancyHost.Start(); }
public static void Main() { var hostUri = "http://localhost:1234"; StaticConfiguration.DisableErrorTraces = false; using (var host = new NancyHost(new Uri(hostUri), new ConsoleBootstrapper())) { host.Start(); Process.Start(hostUri); Console.WriteLine("Press any key to exit."); Console.ReadKey(); } }
static void Main() { var host = new Uri("http://localhost:3406"); using (var server = new NancyHost(host)) { server.Start(); Console.WriteLine("Host is up!"); Console.ReadKey(); server.Stop(); } }
public static void Main(string[] args) { var endpoint = "http://localhost:1234"; using (var host = new NancyHost(new Uri(endpoint))) { host.Start(); Console.WriteLine("Server started on {0}...", endpoint); Console.ReadLine(); } }
static void Main(string[] args) { Uri endpoint = new Uri("http://localhost:1234"); using (var host = new NancyHost(endpoint, new MyBootstrapper())) { host.Start(); Console.WriteLine("Running on http://localhost:1234"); Console.ReadLine(); host.Stop(); } }
public static NancyHost Start(string serviceUri, ILifetimeScope lifetimeScope) { var hostConfig = new HostConfiguration { UrlReservations = new UrlReservations { CreateAutomatically = true } }; var nancyHost = new NancyHost(new Uri(serviceUri), new NonScanningAutofacNancyBootstrapper(lifetimeScope), hostConfig); nancyHost.Start(); return(nancyHost); }
private static void Main(string[] args) { var uri = new Uri("http://localhost:1884"); using (var host = new NancyHost(uri)) { host.Start(); Console.WriteLine($"{DateTime.Now} Simple web server running on {uri}"); Console.WriteLine("Press [Enter] to close the host."); Console.ReadLine(); } }
static void Main(string[] args) { var url = new Uri("http://localhost:12345"); using (var host = new NancyHost(new DefaultNancyBootstrapper(), url)) { host.Start(); Console.WriteLine("Now listening, have fun!"); Console.ReadLine(); } }
internal static void Main(string[] args) { #if DEBUG using ( var host = new NancyHost(new Uri("http://localhost:5000"))) { host.Start(); Console.WriteLine("Running on http://localhost:5000"); Console.ReadLine(); } #endif }
public void Start() { var opts = new HostConfiguration { UrlReservations = { CreateAutomatically = true }, EnableClientCertificates = true, RewriteLocalhost = false }; _host = new NancyHost(opts, new Uri(Url)); _host.Start(); }
public NancyModuleRunner(Action <ConfigurableBootstrapper.ConfigurableBoostrapperConfigurator> configuration) { var host = "localhost"; int port = TCPUtil.GetAvailableTCPPort(8081, 8090); BaseUrl = "http://" + host + ":" + port + "/"; var bootStrapper = new ConfigurableBootstrapper(configuration); _nancyHost = new NancyHost(bootStrapper, new Uri(BaseUrl)); _nancyHost.Start(); }
static void Main(string[] args) { var uri = "http://locahost:1235"; var host = new NancyHost(new Uri(uri)); host.Start(); Console.ReadKey(); host.Stop(); }
static void Main() { Mapper.CreateMap <UserDetails, UserSummary>(); Mapper.CreateMap <RoleDetails, Role>(); using (var host = new NancyHost(new Uri("http://localhost:1234"))) { host.Start(); Console.WriteLine("Server running on http://localhost:1234"); Console.ReadLine(); } }
static void Main(string[] args) { NancyHost host = new NancyHost(new Uri("http://localhost:1234"), new Bootstrapper()); host.Start(); Console.WriteLine("nancy host running..."); Console.WriteLine("press enter to stop"); Console.ReadLine(); Console.WriteLine("nancy host STOPPED!"); host.Stop(); //ConfigureService.Configure(); }
public void Start() { var port = _configuration["WebSitePort"]; var url = "http://localhost:" + port; //API / Web server m_nancyHost = new NancyHost(new Uri(url)); m_nancyHost.Start(); //StatsCounter.Instance.PropertyChanged += Instance_PropertyChanged; }
static void Main() { Manifest.GenerateEntries(); Manifest.GenerateStore(); using (var host = new NancyHost(new Uri("http://localhost:1234"))) { host.Start(); Console.WriteLine("Running on http://localhost:1234"); Console.ReadKey(); //letting cats shutdown systems since 1999. } }
public static void Main(string[] args) { var host = new NancyHost(new Uri("http://localhost:12340")); StaticConfiguration.DisableErrorTraces = false; host.Start(); Console.Write("Press any key to continue . . . "); Console.ReadKey(true); host.Stop(); }
static void Main(string[] args) { var uri = new Uri("http://selfhost.nancyde.mo"); using (var host = new NancyHost(uri)) { host.Start(); Console.WriteLine("Started Nancy self host"); Console.WriteLine("Hit enter very softly to stop"); Console.ReadLine(); } }
/// <summary> /// The entry point of the program, where the program control starts and ends. /// </summary> /// <param name="args">The command-line arguments.</param> public static void Main(string[] args) { // Lancement du serveur web NancyHost host = new NancyHost(new Uri("http://localhost:10563")); host.Start(); Console.WriteLine("Running on http://localhost:10563"); // Attente du programme Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("TEST LOGGING"); Host = new NancyHost(CurrentAddress); Host.Start(); Console.WriteLine("Nancy is started and listening on {0}...", CurrentAddress); while (Console.ReadLine() != "quit") { ; } Host.Stop(); }
public void StartWebHost() { if (_WebHost != null) { _WebHost.Stop(); _WebHost.Dispose(); } string URL = "http://localhost"; _WebHost = new NancyHost(new Uri(URL)); _WebHost.Start(); }
public MainWindow() { _dataGenerator = new DataGenerator(); //_dataGenerator.GetCommentsDB(); InitializeComponent(); Shows.ItemsSource = _dataGenerator.shows; AnimalList.ItemsSource = _dataGenerator.animals; var host = new NancyHost(new Uri("http://localhost:1234")); host.Start(); }
public static void Main(string[] args) { var port = args.FirstOrDefault() ?? "8080"; var url = $"http://localhost:{port}"; using (var host = new NancyHost(new Uri(url))) { host.Start(); Console.WriteLine($"Running on {url}"); Console.WriteLine("Press <Enter> to stop..."); Console.ReadLine(); } }
public static void StartHost() { //监听本地接口 using (var host = new NancyHost(hostConfig, new Uri("http://localhost:31730"))) { host.Start(); while (true) { ; } } }
static void Main(string[] args) { var url = "http://localhost:3100"; using (var host = new NancyHost(new Uri(url))) { Console.WriteLine($"Start web server on {url}\nOpen it in your browser...\nPress any key to stop it..."); host.Start(); Console.ReadKey(); host.Stop(); } }
static void Main(string[] args) { var nancyHost = new NancyHost(new Bootstrapper.Bootstrapper(), new Uri("http://localhost:8888"), new Uri("http://127.0.0.1:8888")); nancyHost.Start(); Console.WriteLine("Nancy now listening - navigating to http://localhost:8888. Press enter to stop"); Process.Start("http://localhost:8888"); Console.ReadKey(); nancyHost.Stop(); Console.WriteLine("Stopped. Good bye!"); }
static void Main(string[] args) { Console.Title = "Flow"; PersistenceIP = FindServerInLocalNetwork(PersistencePort); using (var host = new NancyHost(new Uri($"http://localhost:{Port}"))) { host.Start(); Console.WriteLine($"http://{IP}:{Port}"); Console.ReadLine(); } }
static void Main(string[] args) { using (var host = new NancyHost(new Uri("http://localhost:12088"))) { host.Start(); while (Console.ReadLine() != "quit") { Thread.Sleep(Int32.MaxValue); } } }
public void CreateServer() { var port = "1234"; var foundValueInConfig = ConfigurationManager.AppSettings["port"]; if (!string.IsNullOrEmpty(foundValueInConfig)) { port = foundValueInConfig; } _host = new NancyHost(new Uri("http://localhost:" + port)); _host.Start(); }
static void Main(string[] args) { var uri = new Uri("http://localhost:3579"); using (var host = new NancyHost(uri)) { host.Start(); Console.WriteLine("Your application is running on " + uri); Console.WriteLine("Press any [Enter] to close the host."); Console.ReadLine(); } }
public void Should_be_get_an_exception_indicating_a_conflict_when_trying_to_listen_on_a_used_prefix() { Exception ex; // Given using (CreateAndOpenSelfHost()) { // When ex = Record.Exception(() => { using (var host = new NancyHost(BaseUri)) { host.Start(); } }); } // Then ex.Message.ShouldContain("conflict"); }
private static NancyHostWrapper CreateAndOpenSelfHost(INancyBootstrapper nancyBootstrapper = null, HostConfiguration configuration = null) { if (nancyBootstrapper == null) { nancyBootstrapper = new DefaultNancyBootstrapper(); } var host = new NancyHost( nancyBootstrapper, configuration, BaseUri); try { host.Start(); } catch { throw new SkipException("Skipped due to no Administrator access - please see test fixture for more information."); } return new NancyHostWrapper(host); }
protected override void OnStart(string[] args) { nancyHost = new NancyHost(new Uri(arguments.Url), new PulseBootstrapper()); nancyHost.Start(); }