static void Main(string[] args) { ObjectFactory.Initialize(x => { x.Scan(y => { y.WithDefaultConventions(); y.LookForRegistries(); //y.AssembliesFromPath(Environment.CurrentDirectory, a => a.FullName.StartsWith("Lending")); y.AssembliesFromPath(Environment.CurrentDirectory, Blah); }); }); ObjectFactory.AssertConfigurationIsValid(); string blah = ObjectFactory.WhatDoIHave(); SchemaUpdater.UpdateSchema(); //using (var host = new NancyHost(new Uri("http://localhost:8080"))) //{ // host.Start(); // Console.WriteLine("Nancy has started"); // Console.ReadLine(); //} var host = new AppHost(); host.Init(); host.Start("http://localhost:8085/"); Console.WriteLine("Listening, GO!"); Console.ReadLine(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, SchemaUpdater schemaUpdater) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseMvc(); schemaUpdater.UpdateSchema(CancellationToken.None).GetAwaiter().GetResult(); }