I’m a little uncertain about some Angular 5 aspects. I’ve developed an app and don’t know how to run it on production.
Currently I run my app using
ng serve in
NodeJS , but is it same in a production environment ?
ng serve is for development purpose. Check docs.
ng serve the compiled output is served from memory, not from disk.
This means that the application being served is not located on disk in the dist folder.
ng build –prod is for production purpose. Check docs.
ng build compiles the application into an output directory.
The build artifacts will be stored in the dist/ directory, inside the root directory of your angular app.
Answered By – Shaiju T
Answer Checked By – Cary Denson (AngularFixing Admin)