Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

xkrishguptaa/go-todo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

NOTICE: This learning project has been completed βœ… So I'm saying bye to it and archiving it! You can find my future projects on GitHub


Go Todo API

Supports retrieval, creation, modification and deletion of Todos

View Postman Collection View On Dockerhub

πŸ“– Introduction

This is a simple REST API for a Todo application. It supports retrieval, creation, modification and deletion of Todos.

It is written in Go and uses the Gin framework. I was trying to learn Go and this is my first project in Go.

πŸ“¦ Built With

🌐 Check out Deployed

It is deployed at go-todo-api-sa9e.onrender.com

πŸš€ Getting Started

You need to create a .env file in the root directory of the project and add the following environment variables:

DATABASE_URL=<MongoDB Connection String>
DATABASE_NAME=<MongoDB Database Name>

Or you can set the environment variables directly.

Make sure that the MongoDB database is running and the connection string is correct. The database needs to have a collection named Todos.

🐳 Using Docker

The easiest way to get started is to use Docker. You can pull the image from Dockerhub and run it using the following commands:

docker run -p 8080:8080 --env-file .env xkrishguptaa/go-todo-api

πŸ› οΈ Building From Source

You can also build the API from source. You need to have Go installed on your system. You can then clone the repository and run the following commands:

go mod download
go mod verify
chmod +x ./scripts/build.sh
APP_NAME=go-todo-api ./scripts/build.sh
./bin/go-todo-api

πŸ“š API Documentation

The API documentation is available on Postman.

πŸ“ License

This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.

πŸ™ Acknowledgments