Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Configure(IApplicationBuilder app, IHostingEnvironment env)
- {
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseExceptionHandler("/Error");
- app.UseHsts();
- }
- app.UseStaticFiles();
- app.UseSpaStaticFiles();
- app.UseSwagger();
- app.UseSwaggerUI(c =>
- {
- c.SwaggerEndpoint("/swagger/v1/swagger.json", "AtlanticCORE API V1");
- c.RoutePrefix = string.Empty;
- c.DisplayRequestDuration();
- });
- app.UseAuthentication();
- app.UseMvc(routes =>
- {
- routes.MapRoute(
- name: "default",
- template: "{controller}/{action=Index}/{id?}");
- });
- app.UseSpa(spa =>
- {
- spa.Options.SourcePath = "ClientApp";
- if (env.IsDevelopment())
- {
- spa.UseAngularCliServer(npmScript: "start");
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement