This app was created using following technologies and libraries:
- Node.js
- Express
- Body-parser
- MongoDB
- Mongoose
- React
- Styled components
- Clone this repository to your local drive.
- In the repository folders (main folder and client folder) for each
- run
npm install
to install all server and client dependencies - then run
npm run dev
to start the server and client
- run
Your default browser should open http://localhost:3000/ with the client app.
Server API is listening at port 5000: http://localhost:5000
.
GET all todos for a user - /api/todos/test_user1
GET todo with a given ID
in URL - /api/todo/:id
POST (Update or Add) todo with parameters given in request body as JSON - /api/todo
, example:
Update/PUT will be sent if ID
is present in the request body
{
"id": "5b51d0274a970d1cc42b4ab83",
"todo": "Learn Node",
"isDone": true,
"hasAttachment": false
}
Add/POST will be sent if no ID
was provided
{
"todo": "Learn React",
"isDone": false,
"hasAttachment": false
}
DELETE todo with a given ID
in request body as a JSON - /api/todo
, example:
{
"id": "5b51d0274a970d1cc42b4ab83"
}
{
username: String,
todo: String,
isDone: Boolean,
hasAttachment: Boolean,
}
- Adding, updating, removing todos (todos synchronize with MongoDB database)
- Marking todos as done / not done after clicking on them (done todos change color)
- Displaying form errors
- Mobile friendly