This project demonstrates a simple user authentication system built using Node.js with the Express framework and MongoDB for data storage. It provides endpoints for user registration (sign-up) and user authentication (sign-in).
- User registration with username and password.
- Password hashing using bcrypt for secure storage.
- User authentication with username and password.
- JSON Web Token (JWT) based user authentication.
- Serving static HTML forms for sign-up and sign-in.
- Express server with MongoDB as the database.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your machine.
- MongoDB installed and running on your system.
- Install the required dependencies using npm install
- Start the server using node app.js
- Visit http://localhost:5000/signup to register a new user.
- Visit http://localhost:5000/signin to sign in with your registered credentials.
Database configuration: You can customize the MongoDB connection string.