Skip to content

Instantly share code, notes, and snippets.

@ismcagdas
Created January 30, 2018 12:07
Show Gist options
  • Save ismcagdas/f74643df531f9fff3aa8a8b121b5e0a3 to your computer and use it in GitHub Desktop.
Save ismcagdas/f74643df531f9fff3aa8a8b121b5e0a3 to your computer and use it in GitHub Desktop.
Acme.HeroShop - Startup.cs - 3
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