This repository contains a Web application that illustrates how to work with simple todos via Rest API.
The demo example is here
- Create a Todo
- Set a Todo as completed
- Change Todo's priority
- Delete a Todo
- Get all Todos' data
git clone git@github.com:VS-work/go-todo-client.git
cd go-todo-client
npm install
npm start
- If you want to use the application locally please, run API server before. See
Important notes regarding install
,Build
, andRun locally
. - In this case API will be available on http://localhost:3001
- Also, see this setting
- Create a Todo: POST method for
https://dry-woodland-14649.herokuapp.com/todo
. Body field is:content
as a string. - Change Todo's priority or Set a Todo as completed: PUT method for
https://dry-woodland-14649.herokuapp.com/todo/todo_id
In case of Change Todo's priority
expected body field is priority as integer where 0 is Normal
priority, 1 is Low
, 2 is High
.
In case of Set a Todo as completed
expected body field is completed
where 0 is Not completed
, 1 is completed
3. Delete a Todo: DELETE method for https://dry-woodland-14649.herokuapp.com/todo/todo_id
4. Get all Todos' data: GET method for https://dry-woodland-14649.herokuapp.com/todos
We use github as a hosting. So, the following command will deploy the application:
npm run deploy
Demo example will be available on https://vs-work.github.io/go-todo-client/ after that and it will use https://dry-woodland-14649.herokuapp.com
as API. More info here.