// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime hostApplicationLifetime, IDatabaseContext databaseContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } databaseContext.Apply(); databaseContext.UploadLocalProjects(); app.RegisterWithConsul(hostApplicationLifetime); app.UseHttpsRedirection(); app.UseRouting(); app.UseSwaggerWithUI(Configuration["ApiInfo:Name"], Configuration["ApiInfo:Version"]); app.UsePrometheusMetric(); app.UseAuthorization(); app.UseAuthentication(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }