Mazharncoweb
Read the Article on Fullstack Hub.
Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Copy Build to Server's Views Folder
Once ng build command is successfully completed, copy the dist
folder content and paste it in server's folder views
.
Run the Application
Run the command: pm2 start environment.json --env production
, open the browser and enter the URL (http://localhost:3000).