Skip to content

Lai-YT/todolist

Repository files navigation

Todolist

GitHub go.mod Go version CI codecov GitHub Issues Open GitHub Pull Requests License


Todolist is a simple todo list API server,
allowing you to add, remove, and mark tasks as done.

Brief

This project is a simple endeavor to learn Go, following the blog post Build a Todolist API Server in Golang with modifications.

Features

  • Add a task
  • Remove a task
  • Mark a task as done
  • List all tasks
  • List all tasks that are done
  • List all tasks that are not done

Getting Started

  1. Clone the repository and navigate to the directory
git clone https://github.com/Lai-YT/todolist
cd todolist
  1. Create a docker container for the MySQL database
./create-docker-container.sh

This will create a MySQL container named todolist-mysql with a database named todolist, serving on port 3306. The default username and password are root and root, respectively. The data files of the database are mounted to the ./data directory.

Note

The execution of the script may fail with the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Run the script again, and it should work.

For later use, you can start the container with the following command:

docker start todolist-mysql
  1. Run the API server
go run todolist.go

There's also a frontend for this project, which was initially created by themaxsandelin, modified by sdil, and finally tailored by me. You can find it at Lai-YT/todolist-frontend.

Development

The API server uses:

The tests use:

License

Todolist is licensed under the MIT license.

About

A simple todo list. 📝

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published