secure_link/
|-- config/
| |-- db.js
|-- controllers/
| |-- authControllers.js
|-- middleware/
| |-- authMiddleware.js
|-- models/
| |-- userModel.js
|-- Postman-export/
| |-- Postman.json
|-- routes/
| |-- authRoute.js
|-- test/
| |-- app.test.js
|-- server.js
-
Clone the repository:
git clone <repository-url> cd securelink_assignment_parath
-
Install dependencies:
npm install
-
Set up the environment variables by creating a
.env
file in the root directory:MONGO_URL PORT JWT_SECRET
DEV_MODE=development
4. Run the application:
```bash
npm start
-
Run test :
npm test
-
POST /api/v1/auth/register
-
Register a user
-
Body's JSON should contain: username, email, password, role
Example:
POST /api/users/register
-
-
POST /api/v1/auth/login
-
Login to a user
-
Body's JSON should contain: = email, password
Example:
POST /api/users/login
-
-
POST /api/v1/auth/forget-password
-
Get token for reset password in mail mentioned
-
Body's JSON should contain: = email
Example:
POST /api/users/forget-password
-