Node.js + Express API for TodoPro (auth, todos, MongoDB).
| Command | Description |
|---|---|
npm install |
Install dependencies |
npm start or npm run dev |
Run server (with nodemon for dev) |
npm test |
Placeholder – no tests configured |
- Install:
npm install - Copy
.env.exampleto.envand set:JWT_SECRET– secret for signing tokensMONGODB_URI– MongoDB connection string (default:mongodb://localhost:27017/todo_app_full)CLIENT_URL– frontend origin for CORS (default:http://localhost:3000)PORT– server port (default:5000)
- Ensure MongoDB is running, then:
npm startornpm run dev
Server runs at http://localhost:5000 by default. API base: /api (e.g. /api/auth/login, /api/todos/get).
- Node.js, Express 5, Mongoose, JWT, bcryptjs, CORS, dotenv.