Guest User

Untitled

a guest
Nov 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
  2. {
  3. if (env.IsDevelopment())
  4. {
  5. app.UseDeveloperExceptionPage();
  6. app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
  7. {
  8. HotModuleReplacement = true
  9. });
  10. }
  11. else
  12. {
  13. app.UseExceptionHandler("/Home/Error");
  14. }
  15.  
  16. app.UseStaticFiles();
  17.  
  18. app.UseMvc(routes =>
  19. {
  20. routes.MapRoute(
  21. name: "default",
  22. template: "{controller=Home}/{action=Index}/{id?}");
  23.  
  24. routes.MapSpaFallbackRoute(
  25. name: "spa-fallback",
  26. defaults: new { controller = "Home", action = "Index" });
  27. });
  28.  
  29. // Open the Electron-Window here
  30. await Electron.WindowManager.CreateWindowAsync();
  31. }
Add Comment
Please, Sign In to add comment