Skip to content

This is a REST API developed with Node.js ,Express.js, and MongoDB. It includes both Authentication and Authorization using JWT tokens, it is meant to be as Simple and Secure as possible.

Notifications You must be signed in to change notification settings

0x13A0F/Secure-Express-REST-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure-Express-REST-API

This is a REST Api developed with Node.js ,Express.js, and MongoDB. It includes both Authentication and Authorization using JWT tokens, it is meant to be as Simple and Secure as possible.

Available Endpoints:

Auth Parameters
POST /api/user/login username,password
POST /api/user/register email,username,password,confirm_password
Users Parameters
GET /api/users x
GET /api/user/:id x
PUT /api/user/:id email,username,password
DELETE /api/user/:id x
Post Parameters
POST /api/post title,content,tags,categories
PUT /api/post/:id title,content,tags,categories
DELETE /api/post/:id x
GET /api/post/:id x
GET /api/posts page,tag,category,author_id

How to install

  1. Clone the repo
  2. run npm install to install dependenices
  3. add your RSA public.key and private.key files in /config
  4. create .env file in /config containing the following:
DB_URL=mongodb://username:password@host/rest-api
PORT=4000

make sure to change host,username,password according to your mongodb config 5. Finally, start it with npm start

About

This is a REST API developed with Node.js ,Express.js, and MongoDB. It includes both Authentication and Authorization using JWT tokens, it is meant to be as Simple and Secure as possible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published