Quick StartNodeJS ServerDeployBuild and zip the server

Build and zip the server

Make sure you have followed the Firebase Integration step and you have run “npm install” or “yarn install” inside a root folder terminal.

This use case is useful when you have the possibility to drag and drop the ZIP file to your hosting provider.

The exported ZIP file contains the server files and the environment variables.



After the zip is created, you can upload it to your hosting provider.

Make sure to unzip the file and run the server.

In order to run the server, you need to open up a terminal in the unziped folder and run the following command:

node dist/index.js

or

pm2 startOrReload ecosystem.config.js 

Make sure you have Node.js installed if you are using the first command. If you are using the second command, you need to have PM2 installed.