File size: 1,297 Bytes
55f89e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ```json
{
"name": "tasksphere-backend",
"version": "1.0.0",
"description": "TaskSphere backend API",
"main": "server.js",
"scripts": {
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\""
},
"author": "",
"license": "MIT",
"dependencies": {
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
"mongoose": "^7.4.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"concurrently": "^8.2.0",
"nodemon": "^3.0.1"
}
}
```
To set up the backend:
1. Create a new folder for your project
2. Add these files to the folder
3. Run `npm install` to install dependencies
4. Make sure MongoDB is running (local or Atlas)
5. Run `npm run dev` to start the development server
The backend includes:
- User authentication (JWT)
- Department management
- Task management
- User management
- API endpoints for all frontend operations
- Models for User, Department, and Task
- Authentication middleware
- Proper error handling
You'll need to update your frontend to make API calls to these endpoints. Would you like me to show you how to modify the frontend to work with this backend? |