Skip to content

imhotepper/SpaApiMiddleware

Repository files navigation

SpaApiMiddleware

Enable SPA calls to be served from wwwwroot and only /api calls to go through dotnet core controllers.

How to use it

In your .net core 2.0 Startup.cs class add :

using SpaApiMiddleware;

and then in Configure method add:

app.UseSpaApiOnly(indexHtmlPage:"index.html", apiPath:"api");

Both apiPath and indexHtmlPage are optional parameters.

Have fun, Daiot

About

Enable SPA calls to pass through and only /api to go through dotnet core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages