Table of Contents
In this project you'll find a server with regular username and password authentication and JWT token authorization plus permission levels
- You'll need a MongoDB Atlas account. (the have a free tier)
- Clone the repo
git clone https://github.com/Sabmus/node-secure-server.git
- Install NPM packages
npm install
- Enter your Mongo credentials in
.env
file- Also make sure that your IP address is added in "Network" tab inside MongoDB Dashboard
- Enter
keys
folder and create a new set of keys with (note thatAAA
must be replaced with a number of days in which the cert and key will be valid):openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days AAA
Create users with different permission levels and try each endpoint
Distributed under the MIT License. See LICENSE.txt
for more information.