예제 #1
0
파일: Startup.cs 프로젝트: Maqsoodp/acme
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, DbInit dbInit, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler();
            }

            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/flight/swagger.json", "Acme remote flight Rest API");
            });

            app.UseMvc();
            app.UseStaticFiles();
            dbInit.Load();
        }