express-auth is a simple authentication application using Express.js, JWT, and MongoDB. It provides login functionality and route protection in a web application
express-auth is a demo application that illustrates how to implement an authentication system using Express.js, JWT, and MongoDB. The project includes examples of protected routes and user session management
- Authentication with JWT
- Route protection
- MongoDB for user data storage
- Clear error messages for authentication
- Node.js v14 or later
- npm (Node Package Manager)
- MongoDB instance
- Create a
.env
file in the root directory of the project and add the following environment variables:JWT_SECRET=your-jwt-secret MONGO_URI=your-mongodb-uri
-
Clone this repository:
git clone https://github.com/bushido2014/express-auth.git cd express-auth
-
Install dependencies:
npm install
This project is licensed under the MIT License. See the LICENSE file for details.