Implement a User Registration API Endpoint with JWT Authentication and Input Validation
A simple RESTful API built with Node.js and Express.js that allows users to register securely using JWT authentication and input validation.
- User registration with username, email, and password
- Password hashing with bcryptjs
- Input validation using express-validator
- JWT token generation for authentication
- MongoDB integration with Mongoose
- Error handling and validation feedback
- Node.js and npm installed
- MongoDB instance (local or cloud)
- Clone the repo:
git clone https://github.com/yourusername/user-registration-api.git cd user-registration-api