Spaces:
Running

brainboost-academy / package.json
bravo09's picture
can you prepared backend
082a1d3 verified
Raw History Blame Contribute Delete
990 Bytes
Invalid JSON:Unexpected token '`', "```json { "... is not valid JSON
```json
{
"name": "brainboost-backend",
"version": "1.0.0",
"description": "Backend for BrainBoost Academy",
"main": "server.js",
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.0",
"mongoose": "^7.0.3"
},
"devDependencies": {
"nodemon": "^2.0.20"
}
}
```
This backend setup includes:
1. Express server with JWT authentication
2. MongoDB models for Users and Courses
3. REST API routes for authentication, courses, and camps
4. Role-based authorization (student, instructor, admin)
5. CORS and cookie-based authentication
6. Ready for production deployment
To use:
1. Create `.env` file from `.env.example`
2. Run `npm install`
3. Start with `npm run dev` (development) or `npm start` (production)