1 > npm i 2 > update env send mail credentials (ethereal for test) 3 > npm run dev 4 > http://localhost:PORT/index.html 5 > fill the form and click on submit
done==> mongo db connection register user request validation file upload
This API allows users to register by providing their name, email address, password, and profile picture. Upon successful registration, the user's information is stored in a MongoDB database, and a confirmation email is sent to the registered email address.
- Node.js
- MongoDB
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file with the following environment variables:MONGO_URI=your_mongodb_connection_string EMAIL_USER=[email protected] EMAIL_PASS=your_email_password
- Start the server:
npm start
Registers a new user.
- Headers:
Content-Type: multipart/form-data
- Body:
name
: string (required)email
: string (required)password
: string (required)profilePicture
: file (optional)
- Success:
201 Created
{ "message": "User registered successfully. Please check your email for confirmation." }