Deploy: Production
Deploying changes to production environment
Navigate to root app production folder
Pull From Github
This will subject to your Git branch workflow
Angular
The start:prod command does the following:
Set the Angular .env file to production
Run ng build to compile files in an angular default development mode
Start angular server by default on port 4200
NestJS
The NestJS NPM start:prod command does the following:
Set NestJS .env file to production
Delete the /dist folder
Delete the log file
Build application files in the /dist folder
Copy handlebar email templates used by NestJS server pages to /dist folder
Launch the app with pm2 server
Database Migration
In development and staging environemenrs TypeORM will automatically sync the database schema with any changes to entities on deployment. However in production application this can be dangerous as the changes cannot be undone. Nesula by default does not sync in production as defined the config file. Database migrations will have to be run manually.
Generating & Running Migrations
Revert Migrations
To undo changes made to the database user revert:
Last updated
Was this helpful?