-
Clone the repository:
git clone <repository-url> cd node-mvc-project
-
Install dependencies:
npm install
-
Create a .env file and add the following variables:
MONGO_URI=mongodb://localhost:27017/yourdbname PORT=3000 JWT_SECRET=your_jwt_secret
-
Run the application:
node src/index.js
Running Tests
To run unit tests:
bash
npm test
GET /worko/user - List all users
GET /worko/user/:userId - Get user details by ID
POST /worko/user - Create a new user
PUT /worko/user/:userId - Update user details
PATCH /worko/user/:userId - Partially update user details
DELETE /worko/user/:userId - Soft delete a user