Created
January 30, 2018 12:07
-
-
Save ismcagdas/f74643df531f9fff3aa8a8b121b5e0a3 to your computer and use it in GitHub Desktop.
Acme.HeroShop - Startup.cs - 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
public IServiceProvider ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc(); | |
services.AddNodeServices(); | |
return services.AddAbp<HeroShopPublicModule>(); | |
} | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
app.UseAbp(options => { options.UseAbpRequestLocalization = false; }); | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.UseStaticFiles(); | |
app.UseStaticFiles(new StaticFileOptions | |
{ | |
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"HeroApp", @"dist-server")), | |
RequestPath = new PathString("/HeroApp/dist-server") | |
}); | |
app.UseMvc(routes => | |
{ | |
routes.MapRoute(name: "default", template: "{controller=Home}/{action=Index}/{id?}"); | |
routes.MapSpaFallbackRoute(name: "spa-fallback", defaults: new { controller = "Home", action = "Index" }); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment