During SPA development, we are facing some difficulties on how to serve bundled frontend files from e.g. gulp or webpack, or work parallel with a frontend and a backend environment (e.g. frontend served from by an Express/Webpack/Gulp dev.server and sensenet by IIS). I've collected some ideas, but we need to talk about which one should be supported
Serve sensenet ECM from IIS and frontend from frontend DEV server
Pros
Decoupled, independent solutions
Cons
We have to deal with CORS, in that case #98 is a blocker
OPTIONS Preflight request performance impact
Upload and serve bundles from sensenet ECM with Explore (current solution)
Pros
Works out of the box
Cons
Depends on Webpages
You have to upload manually after compiling the SPA
Cannot use Diskfs mode in case of incremental builds (chunk names will change, you have to upload them manually)
Create a static site for frontend distribution and a web application for sensenet one level below
Pros
Can be a working solution in both dev and production environments
Easy to set up and maintain
Cons
sensenet has to be a top level IIS site, so it is not supported
Create a fallback route in an ASP.NET web app that picks up and serves static files
Pros
?
Cons
The implementation will be different in the case of MVC project and/or Web API project
Redirect OData and Login requests from frontend dev server
Pros
?
Cons
JWT auth uses secure cookies, and they won't work with dev servers as they typically won't support it
Redirect every request excluding OData and Login from IIS to dev server
The problem
During SPA development, we are facing some difficulties on how to serve bundled frontend files from e.g. gulp or webpack, or work parallel with a frontend and a backend environment (e.g. frontend served from by an Express/Webpack/Gulp dev.server and sensenet by IIS). I've collected some ideas, but we need to talk about which one should be supported
Serve sensenet ECM from IIS and frontend from frontend DEV server
Pros
Cons
Upload and serve bundles from sensenet ECM with Explore (current solution)
Pros
Cons
Create a static site for frontend distribution and a web application for sensenet one level below
Pros
Cons
Create a fallback route in an ASP.NET web app that picks up and serves static files
Pros
Cons
Redirect OData and Login requests from frontend dev server
Pros
Cons
Redirect every request excluding OData and Login from IIS to dev server
Pros
Cons