bradtraversy / contact_keeper_api

REST API with JWT for React course
147 stars 47 forks source link

Contact Keeper API

This is a Node/Express/MongoDB REST API for contacts that uses JWT authentication. All contact endpoints are protected and each registered user has their own contacts. This is used in my React course on Udemy. It is the API ONLY. The fullstack app can be found here

Getting Started

  Open the config/default.json file and add your mongoURI and your jwtSecret
  npm install
  npm run server # Runs on http://localhost:5000

API Usage & Endpoints

Register a User [POST /api/users]

Login with a User [POST /api/auth]

Get Contacts [GET /api/contacts]

Add New Contact [POST /api/contacts]

Update Contact [PUT /api/contacts/:id]

Delete Contact [DELETE /api/contacts/:id]