...
- Checking which microservices currently are registered and which dependencies they have based on their getModules.json
- npm install all dependencies and concatenate them into optimized vendor.js and vendor.css files.
- download Download and concatenate all css and js files from the microservices into optimized main.js and main.css files.
- Create the html basis of the page, which includes the menu and some other things which are common to the whole frontend.
- Serve everything on /
All of this is just done once on application startup, so when something in the system changes this will not be reflected in the frontend immediately.
CLI Usage
You will want to interact with the central frontend when developpingdeveloping. In general, a rebuild of the frontend can be performed by running `bash oms.sh run oms-central-frontend gulp`. This will rebuild the frontend to reflect the current status of the services as returned by the serviceregistry. If you just did a couple of small changes, a gulp rebuild might be what you want to do, but if you intend to do several changes, you will not want to run a frontend rebuild every time you change something. For this, the central frontend offers to build the frontend in dev-mode, which turns off most of the code optimizations optimisations including concatenating the files into one, and will include your sources directly. To turn on dev mode, change the boolean devMode in `oms-central-frontend/lib/config.json` to true You will still have to rebuild the frontend when you add a dependency or a new file though.
...