This project is a simple Node.js application that provides a user friendly system for job management. It includes JWT authentication and is backed by MongoDB database. Once authenticated, users can create, update, retrieve, and delete jobs.
- JWT authentication for secure user login
- MongoDB database for storing job data
- Create, update, retrieve, and delete job functionality
- Hosted on Heroku for easy deployment and scalability
- Node.js and npm installed
- MongoDB Atlas account and cluster created
- Heroku account (is paid now)
- Clone this repository.
- Run npm install to install the project's dependencies.
- Create a .env file in the root of the project and add the following variables:
MONGO_URI=<MONGODB_ATLAST_URI>
JWT_SECRET=<YOUR_JWT_SECRETE>
JWT_EXPIRY=<EXPIRY>
PORT=<PORT>
- Start the development server using Nodemon.
npm run dev
This application is ready to be deployed to Heroku. To do so, you will need to set up a MongoDB instance and a Heroku account. Then, follow these steps:
- Create a new heroku app
heroku create jobs-api
-
Set environment variables as per above
-
Push code to Heroku
git push heroku main
- Open the app
heroku open