A simple contact manager API built with Node.js, Express.js and MongoDB with Authentication, Authorization, JWT, Middlewares, Protected Routes, Mongoose, DB Relationships.
Public Routes
- Register User (POST /api/users/register)
- Login User (POST /api/users/login)
Protected Routes (Need to be logged in to access)
- Get Logged In User (GET /api/users/current)
- Get All Contacts (GET /api/contacts)
- Add New Contact (POST /api/contacts)
- Update Contact (PUT /api/contacts/:id)
- Delete Contact (DELETE /api/contacts/:id)
# Install dependencies
npm install
# Serve on localhost:5000
npm run dev (nodemon)
# Build for production
npm run build