This is the backend for the Support Ticket Entry System app. It is built with Express and runs on port 3091.
NOTE: This is the backend of the application. The frontend can be found here.
- Node.js (version 18.19.0)
- npm (version 10.2.3)
- Clone the repository:
git clone https://github.com/mp051998/support-ticket-entry-system-backend.git
- Install the dependencies:
cd support-ticket-entry-system-backend
npm install
- Create a
.env
file in the root directory of the project. Add the following environment variables to it:
PORT=<your-port-number>
MONGODB_CONNECTION_URI=<your-mongodb-uri>
MONGODB_DATABASE_NAME=<your-mongodb-database-name>
- Start the server:
npm start
- The server should now be running on
http://localhost:<your-port-number>
.
PM2 is a process manager for Node.js applications that allows you to easily manage and monitor your application's processes. It provides features like automatic restarts, load balancing, and log management. With PM2, you can ensure that your Node.js application stays up and running, even in production environments.
This project supports PM2 to manage the application's processes. The server once started will be running in the background. You can use the following commands to manage the server.
npm install pm2
You are now all set to use PM2 to manage the server.
npm run start:pm2
npm run stop:pm2
npm run restart:pm2
npm run status:pm2
npm run delete:pm2
npm run logs:pm2