Skip to content

Jobs API, ability to perform CRUD operations for the Job in MongoDB, learnt how to set up SWAGGER UI in the project

Notifications You must be signed in to change notification settings

anshkush92/jobs-api

Repository files navigation

Logo

Job API

Welcome to the Job API! A JOB API provides a set of functions or methods for creating, reading, updating, and deleting (CRUD) jobs.

Documentation

Documentation can be found here Jobs API Docs

Features

  • 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

Tech Stack

API Reference

Auth

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

Job

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

Run Locally

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 

Authors

License

MIT License

About

Jobs API, ability to perform CRUD operations for the Job in MongoDB, learnt how to set up SWAGGER UI in the project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published