A Node.js backend application with user authentication and profile management.
POST /api/auth/signup
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123",
"name": "John Doe",
"mobileNumber": "1234567890"
}
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}
POST /api/auth/forget-password
Content-Type: application/json
{
"email": "user@example.com"
}
GET /api/profile
Authorization: Bearer YOUR_JWT_TOKEN
PUT /api/profile
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"name": "Updated Name",
"mobileNumber": "9876543210"
}
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file with:MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret PORT=3000
- Create a
-
Run the development server:
npm run dev
The API is configured for deployment on Vercel using the provided vercel.json
configuration.
https://asdw-5bf5m9e9a-vikiis-projects.vercel.app/api.