{"id":19143160,"url":"https://github.com/devenes/todos-api","last_synced_at":"2026-05-16T15:34:31.943Z","repository":{"id":38291683,"uuid":"500907579","full_name":"devenes/todos-api","owner":"devenes","description":"This API is a simple todo list. It is a RESTful API that allows you to create, read, update and delete todos.","archived":false,"fork":false,"pushed_at":"2022-11-09T14:01:06.000Z","size":234,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T19:25:51.160Z","etag":null,"topics":["api","docker","dockerfile","go","golang","multi-stage","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devenes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-07T15:54:42.000Z","updated_at":"2022-06-07T18:49:36.000Z","dependencies_parsed_at":"2023-01-21T22:17:31.058Z","dependency_job_id":null,"html_url":"https://github.com/devenes/todos-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devenes/todos-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devenes%2Ftodos-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devenes%2Ftodos-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devenes%2Ftodos-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devenes%2Ftodos-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devenes","download_url":"https://codeload.github.com/devenes/todos-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devenes%2Ftodos-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33108190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","docker","dockerfile","go","golang","multi-stage","restful-api"],"created_at":"2024-11-09T07:29:45.854Z","updated_at":"2026-05-16T15:34:31.915Z","avatar_url":"https://github.com/devenes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" id=\"top\"\u003e \n  \u003cimg src=\"go.jpeg\" alt=\"Todos Api\" /\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003eTodo List API\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Go Build\" src=\"https://github.com/devenes/todos-api/actions/workflows/codeql.yml/badge.svg\" /\u003e\n  \u003cimg alt=\"Go Build\" src=\"https://github.com/devenes/todos-api/actions/workflows/go_build.yml/badge.svg\" /\u003e\n  \u003cimg alt=\"Tool\" src=\"https://badges.aleen42.com/src/docker.svg\"\u003e\n  \u003cimg alt=\"Tool\" src=\"https://badges.aleen42.com/src/golang.svg\"\u003e\n  \u003cimg alt=\"Tool\" src=\"https://badges.aleen42.com/src/github.svg\"\u003e\n  \u003cimg alt=\"Github top language\" src=\"https://img.shields.io/github/languages/top/devenes/todos-api?color=56BEB8\"\u003e\n  \u003cimg alt=\"Github language count\" src=\"https://img.shields.io/github/languages/count/devenes/todos-api?color=purple\"\u003e\n  \u003cimg alt=\"Repository size\" src=\"https://img.shields.io/github/repo-size/devenes/todos-api?color=orange\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/devenes/todos-api?color=red\"\u003e\n  \u003c!-- \u003cimg alt=\"Github issues\" src=\"https://img.shields.io/github/issues/devenes/todos-api?color=56BEB8\" /\u003e --\u003e\n  \u003c!-- \u003cimg alt=\"Github forks\" src=\"https://img.shields.io/github/forks/devenes/todos-api?color=56BEB8\" /\u003e --\u003e\n  \u003c!-- \u003cimg alt=\"Github stars\" src=\"https://img.shields.io/github/stars/devenes/todos-api?color=56BEB8\" /\u003e --\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#dart-about\"\u003eAbout\u003c/a\u003e \u0026#xa0; | \u0026#xa0; \n  \u003ca href=\"#sparkles-features\"\u003eFeatures\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"#rocket-technologies\"\u003eTechnologies\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"#white_check_mark-requirements\"\u003eRequirements\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"#checkered_flag-starting\"\u003eStarting\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"#-Multi-Stage-Containerization\"\u003eContainerization\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"#memo-license\"\u003eLicense\u003c/a\u003e \u0026#xa0; | \u0026#xa0;\n  \u003ca href=\"https://github.com/devenes\" target=\"_blank\"\u003eAuthor\u003c/a\u003e\n\u003c/p\u003e\n\n## :dart: About\n\nThis API is a simple todo list. It is a RESTful API that allows you to create, read, update and delete todos.\n\n## :sparkles: Features\n\n| Parameter | Type     | Description                  |\n| :-------- | :------- | ---------------------------- |\n| `id`      | `string` | The id of the todo object    |\n| `title`   | `string` | The title of the todo object |\n\n:heavy_check_mark: List todos\\\n:heavy_check_mark: Get todo status\\\n:heavy_check_mark: Create a new todo object\\\n:heavy_check_mark: Delete a todo object\n\n## :rocket: Technologies\n\nThe following tools were used in this project:\n\n- [Go](https://golang.org/): The language used in this project\n- [Docker](https://www.docker.com/): The containerization tool used in this project\n- [GitHub](https://www.github.com/): The source control tool used in this project\n- [GitHub Actions](https://github.com/actions/): The continuous integration tool used in this project\n\n## :white_check_mark: Requirements\n\nBefore starting :checkered_flag:, you need to have [Git](https://git-scm.com), [Docker](https://www.docker.com/), and [Go](https://golang.org) installed.\n\n## :checkered_flag: Starting\n\n- Clone the project\n\n```bash\ngit clone https://github.com/devenes/todos-api\n```\n\n- Go to the project directory:\n\n```bash\ncd todos-api\n```\n\n- Run the following command to start the server:\n\n```bash\ngo run main.go\n```\n\n- You can also run the server in the background:\n\n```bash\ngo run main.go \u0026\n```\n\n- Build the Docker image:\n\n```bash\ndocker build -t devenes/todos-api:1 ./\n```\n\n- You can also run the server in a Docker container:\n\n```bash\ndocker run -p 8080:8080 -d devenes/todos-api:1\n```\n\n- See the output:\n\n```bash\ndocker build -t devenes/todos-api:1 ./ \u0026\u0026 docker run -p 8080:8080 -d devenes/todos-api:1 \u0026\u0026 explorer \"http://localhost:8080/todos\"\n```\n\n- List todos with the following command:\n\n```bash\ncurl http://localhost:8080/todos\n```\n\n- Get the first todo with the following command:\n\n```bash\ncurl http://localhost:8080/todos/1\n```\n\n- Create a new todo with the following command:\n\n```bash\ncurl -X POST -H 'content-type: application/json' --data '{\"id\": \"4\", \"title\": \"Buy milk\"}' http://localhost:8080/todos\n```\n\n- Update the first todo with the following command:\n\n```bash\ncurl -X POST -H 'content-type: application/json' --data '{\"id\": \"1\", \"title\": \"Check the mailbox\"}' http://localhost:8080/todos\n```\n\n- Delete the first todo with the following command:\n\n```bash\ncurl -X DELETE http://localhost:8080/todos/1\n```\n\n- Get the second todo with the following command:\n\n```bash\ncurl http://localhost:8080/todos/2\n```\n\n- Stop and remove all Docker containers and images:\n\n```bash\ndocker stop $(docker ps -aq) \u0026\u0026 docker rm $(docker ps -aq) \u0026\u0026 docker rmi $(docker images -q)\n```\n\n## 🐳 Multi-Stage Containerization\n\nYou can reduce the size of the Docker image from 301MB to 12MB by using multi-stage containerization. Check the [Dockerfile](Dockerfile) to see how it works and look at the latest image created with alpine.\n\n![Docker image](images.png)\n\n## :memo: License\n\nThis project is under license from Apache 2.0. For more details, see the [LICENSE](LICENSE) file.\n\nMade with :heart: by \u003ca href=\"https://github.com/devenes\" target=\"_blank\"\u003edevenes\u003c/a\u003e\n\n\u0026#xa0;\n\n\u003ca href=\"#top\"\u003e⬆️ Back to top\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevenes%2Ftodos-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevenes%2Ftodos-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevenes%2Ftodos-api/lists"}