Skip to content

Simple users CRUD REST API based on Node and Mongodb as a boilerplate to start a project

License

Notifications You must be signed in to change notification settings

RedJanvier/node-mongo-starter

Repository files navigation

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

About

Simple users CRUD REST API based on Node and Mongodb as a boilerplate to start a project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published