To get the Node server running locally:
-
Clone this repo
-
npm install
to install all required dependencies -
Create MongoDb Cluster and Get Connection MongoDb URI
-
Set environment variables in
config.env
under./config/env
- Set
MONGO_URI = <YOUR_MONGO_URI>
- Set
JWT_SECRET_KEY = <YOUR_SECRET_KEY>
- Set
-
npm run dev
to start the local server
- expressjs - The server for handling and routing HTTP requests
- jsonwebtoken - For generating JWTs used by authentication
- mongoose - For modeling and mapping MongoDB data to JavaScript
- bcryptjs - Hashing Password
- dotenv - Zero-Dependency module that loads environment variables
- multer - Node.js middleware for uploading files
Requests are authenticated using the Authorization
header and value Bearer: {{token}}
. with a valid JWT.