This project is hosted on https://todolistapi-kcjj.onrender.com
This is a backend for TodoList Web Apps on https://github.com/tobiasprima/todolist_react_web
- Clone
git clone https://github.com/tobiasprima/todolist_react_web- Install Dependency
go mod tidy- To test with Mongodb locally
-create new
.envfile and add:
DATABASE_URI = {YOUR_DATABASE_URI}-run on localhost
go run main.go- Test Endpoints on postman
http://localhost:8080/todoshttp://localhost:8080/todowith body
{
"title" : {INPUT_TITLE}
}Status will default to false (Uncompleted)
http://localhost:8080/todo/{ID} // copy ID from get/todos methodThis will create an order property for todos and it will automatically sorted in the get method
http://localhost:8080/todos/reorderhttp://localhost:8080/todos/reset