The Backend is a simple Node.js application that uses the pm2 BUS API to communicate and monitor pm2 processes. It doesn't require any open ports, since it only saves data to the database, and events like restart, stop, and delete are relayed through the change stream of MongoDB.
- Node.js v18
- MongoDB Cluster
- PM2 (installed globally)
MONGO_URI=<MongoDB URI>-
Install the dependencies
# run from the project root npm install -
Create a
.envfile in theapps/backenddirectory and add the following variablesMONGO_URI=<MongoDB URI>
You can start it using the following npm command:
# run from the project root
npm run start:apps:backendTo run the process in the background, you can use several tools such as PM2.
This will start it using pm2. Furthermore, you can hide it from the process list through the dashboard.
# run from the project root
pm2 start npm --name "pm2.web-daemon" -- run "start:apps:backend"