Welcome to the Job API! A JOB API provides a set of functions or methods for creating, reading, updating, and deleting (CRUD) jobs.
Documentation can be found here Jobs API Docs
- Supports CRUD operations
- Supports Register / login functionality
- Create (C)
- Allows user to create a new job
- Returns created job if successful otherwise an error
- Get All Job (R)
- Allows user get all the jobs
- Get a Job (R)
- Allows user to get a particular job
- Need to provide the id of the job that we want to get
- Update a job (U)
- Allows user to update the values of the exsisting job
- Need to provide the updating data
- Delete a job (D)
- Allows user to delete a particular job
- Need to provide the id of the job to be deleted
Method | Route | Parameters | Body | Description |
---|---|---|---|---|
POST | /auth/register | - | {name: String, email: String, password: String} |
To register ther user |
POST | /auth/login | - | {email: String, password: String} |
To login the user |
Method | Route | Parameters | Body | Description |
---|---|---|---|---|
POST | /jobs/create | - | {company: String, position: String, status: String} |
To create a new job |
GET | /jobs | - | To get all the jobs | |
GET | /jobs/:id | id | To get a job with a particular id | |
PUT | /jobs/edit/:id | id | {company: String, position: String, status: String} |
To update a job with a particular id |
DELETE | /jobs/delete/:id | id | To delete a job with the particular id |
Clone the project
git clone https://github.com/anshkush92college/jobs-api
Go to the project directory
cd jobs-api
Install dependencies
npm install
Create a .env file and add your own value
MONGO_URI=""
JWT_SECRET=""
PORT=""
SALT_ROUNDS=""
Start the server
npm run dev