Skip to content

rajabmohammadi/user-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js + MongoDB + Express.js - Simple API for Authentication, Registration and User Management

Project Description

In this project we'll go through an example Node.js, Express.js and MongoDB API that supports user registration, login with JWT authentication and user management. For an extended example that includes refresh token. The API is written in Typescript for NodeJS and requires MongoDB to be running. Mongoose is used to connect to MongoDB, define the database schema and read/write data. Express is used as the web server.

Table of Contents

• Install Node.js and MongoDB
• Running the project API locally
• Testing the API with Postman

Install Node.js and MongoDb

• Install Node.js and NPM, when you install the Node.js NPM install automatically: https://nodejs.org/en/download/
• Install MongoDB Community Server from: https://www.mongodb.com/try/download/community
• Run MongoDB : https://docs.mongodb.com/manual/administration/install-community/

Running the project API locally

• Please clone or download the project from this link : https://github.com/RajabMohammadi/user-management
• Run npm install from the command line in the project root folder
• Start the API by running npm run dev from the command line in the project root folder, you should see the messages Server running at http://localhost:3000 and connected to mongodb

Testing the API with Postman

Sign Up New User Sign Up Login User login-user Upate User update-user Get User get-user Refresh Token refresh-token Note: You can get the refresh token from login user request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published