You need to install Node.js before .
Install dependencies:
$ npm install
Start the server:
$ npm start
The URL :
The application use express to provide a simple Web-API (REST) which provides the path to the SPA’s script and the list of path are display on the home page .
We have also the front end who is doing a lazy loading of SPA ( Actually Home.js and About.js )
For Example on the menu of the home , we want to add Contact Us
This the procedure :
1- Add The Contact.js into the folder /views/page
2- Add to the app.js file the url of This new SPA. by doing two thing :
import Contact from './views/pages/Contact.js';
You must add on the list of supported routes the url of this spa.
3- add the url of this spa in the navbar and then test .