Skip to content

Latest commit

 

History

History
92 lines (61 loc) · 2.12 KB

README.md

File metadata and controls

92 lines (61 loc) · 2.12 KB
hero-cover

Node Mongo Starter (NMS) BY RedJanvier

This is a REST API based on Node Js, Express, Mongodb with mongoose, email verification, swagger documentation and tests with Mocha and Chai and a secure JWT authentication and deals with managing users.

PREREQUISITES

Features

  • ✔ User(any) should be able to register and verify email
  • ✔ User(any) should be able to login into his/her account
  • ✔ User(logged in) should be able to see all users on the app
  • ❌ User(logged in) should be able to logout of his/her account
  • ✔ User(logged in) should be able to get all details of any User

Initial setup

Run the following commands

npm install
touch .env

Copy all content from .env.example file to .env file then fill it with proper info

Run npm run dev to start the server in development or

Run npm start for production mode

Routes

List all users (require login)

[GET] /api/v1/users

:body: none

User login

[POST] /api/v1/users/login

:body: {
  email "STRING",
  password "STRING"
}

User register

[POST] /api/v1/users/signup

:body: {
  name "STRING",
  password "STRING",
  email "STRING",
}

Tech stack

  • bcryptjs
  • Node JS
  • Express JS
  • jsonwebtoken
  • mocha & chai
  • MongoDB with Mongoose

Author

RedJanvier

Contacts

Github

Twitter

YouTube

Facebook