A simple Node.js + Express API that lets users create and view tasks.
- Clone repo
- Run
npm install - Start server:
npm start - Open http://localhost:3000/api/tasks
https://task-api-yourname.onrender.com/api/tasks
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tasks | Get all tasks |
| POST | /api/tasks | Add a new task |
- Node.js
- Express.js
- CORS
- Faced CORS issues while connecting frontend โ fixed using
cors()package. - Server didnโt run on Render due to hardcoded port โ changed to
process.env.PORT. - Git push errors due to wrong remote โ fixed by resetting remote and using access token.