My #001 Mini Project on learning Go.
Based on Mohamad Fadhil's blog post and medium
- Go
- Docker
- clone into your chosen folder (eq :
~/works/
)
- docker run -d -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=root mysql
- docker exec -it mysql mysql -u root -p -e 'CREATE DATABASE todolist'
- docker exec -it mysql bash
- mysql -h localhost -u root -p
- $ go run todolist.go
- $ curl -i localhost:8000/healthz
- $ curl -X POST -d "description=Cook for dinner" localhost:8000/todo
- $ curl -X POST -d "completed=true" localhost:8000/todo/1
- $ curl -X DELETE localhost:8000/todo/1
- $ curl -i localhost:8000/todo-incomplete
- $ curl -i localhost:8000/todo-completed