TODO_GO: a simple todo API created in Golang with a minimum number of dependencies and configuration

Overview

TODO_GO golang icon

TODO_GO is a simple todo API created in Golang with a minimum number of dependencies and configuration.

Content

Inspiration

As many times, when you want to start a new frontend project, you will need to create or to find a simple backend API to structure your application. Usually using something like The Rick and Morty API which is very complete, but doesn't allow you make any change on the API. In this case, you will be able to use the API and change it as much as you need.

Prerequisites

In order to run this project you will need Go v1.17 installed on your local environment: Golang.

Also you will need to create a database in MongoDB. To do this you can install MonogoDB on your computer or use a free cloud solution: MongoDB.

Installation

1. Clone the project

Clone this project using the following command:

git clone [email protected]:AlejandroAcev/todo_go.git

2. Install the dependencies

Install all the required dependencies using:

go get ./...

3. Add the configuration

Add the required values to connect the API with the MongoDB database and the desired port in the .env file:

PORT=8080
MONGO_PASS=MySecretPass
MONGO_URI=mongodb+srv://<your_user>:${MONGO_PASS}@mongogeneric.ujgee.mongodb.net/<database_name>?retryWrites=true&w=majority

4. Run the project

The simplest way to run the code is usgin the following command.

go run main.go

But if you prefer you can compile the code and generate an executable to run on your machine:

go build -o todo_go #or the name that you prefer

Routes

In order to connect your web application you can use any of the following endpoints:

GET         /api/tasks               # Shows all the task created
POST        /api/task                # Creates a new task with the specified data
GET         /api/task/<id>           # Shows the details of a specific task
POST | PUT  /api/task/<id>           # Modify/Update the task selected
DELETE      /api/task/<id>           # Delete the specified task

Also you can find a Thunder collection and a thunder environment file with all the required data and information to use the app.

Example of body for create a new task:

POST /api/task

{
    "title": "Title example!",
    "description": "This is a very long description",
    "tags": ["Tag1", "Tag2"],
    "completed": false
}

Credits

Alejandro Acevedo - @AlejandroAcev

License

The MIT License (MIT)

Copyright (c) 2022 Alejandro Acevedo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues
Releases(v1.0)
Owner
Alejandro Acevedo Gonzalez
Alejandro Acevedo Gonzalez
Todo-list - In this project using golang and mySql to create todo-list to Add and remove

TODO-Fullstack-App-Go-Gin-Postgres-React This fullstack application creates a TODO List Web Page using the Go/Gin/Postgres/React Stack. Starting the a

Krishna Nagpure 1 Jan 19, 2022
Simple Golang API for creating todo notes

Simple Golang API for creating todo notes To run: [email protected]:~$ cd backend [email protected]:~$ go run . Application will be listening on localhost:8080 API routes

Artem Vovchenko 0 Oct 27, 2021
A simple todolist application API created using Golang

API Aplikasi KegiatanQ Merupakan API aplikasi todolist sederhana yang dibuat men

Wandi Pratama 0 Dec 29, 2021
Todo api with Golang.

Todo api with Golang. API Description: GET /api/todo => [{"id":1,"text":"First Todo"},{"id":2,"text":"Second Todo"}], POST /api/todo => {text:"Third

null 0 Dec 19, 2021
planet is a blockchain built using Cosmos SDK and Tendermint and created with Starport.

planet planet is a blockchain built using Cosmos SDK and Tendermint and created with Starport. Get started starport chain serve serve command install

Andrei Ivasko 0 Oct 31, 2021
Delete CloudFormation stacks respecting stack dependencies

CFN Teardown Cleanup CloudFormation stacks respecting the order of dependencies. Features Stack name pattern matching for deletion. Finds out dependen

Nirdosh Gautam 10 Jan 10, 2022
Package figtree provides a multi-paradigm SDK for sophisticated configuration file access

Package figtree provides a multi-paradigm SDK for sophisticated configuration file access. Motivation Figtree syntax is based on classic key/value pai

Read Write Pro 0 Dec 31, 2021
A API scanner written in GOLANG to scan files recursively and look for API keys and IDs.

GO FIND APIS _____ ____ ______ _____ _ _ _____ _____ _____ _____ / ____|/ __ \ | ____|_ _| \ | | __ \ /\ | __ \_

Sreekanth Sasi 3 Oct 25, 2021
Simple-api - Create Simple `Hello World` APIs from Various Programming Languages

simple-api Create Simple `Hello World` APIs from Various Programming Languages.

I am Groot 1 Jan 18, 2022
An API client for the Notion API implemented in Golang

An API client for the Notion API implemented in Golang

Anatoly Nosov 248 Jan 9, 2022
Arweave-api - Arweave API implementation in golang

Arweave API Go implementation of the Arweave API Todo A list of endpoints that a

Joshua Lawson 0 Jan 10, 2022
Simple golang airtable API wrapper

Golang Airtable API A simple #golang package to access the Airtable API. Table of contents Golang Airtable API Table of contents Installation Basic us

mehanizm 31 Jan 12, 2022
An implementation of a simple RESTful API in Golang on AWS infrastructure.

go-api An implementation of a simple RESTful API in Golang on AWS infrastructure. Tech Stack Serverless framework Go language AWS API Gateway AWS Lamb

Amirmohsen 0 Dec 25, 2021
lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin to AWS Lambda and Amazon API Gateway.

aws-lambda-go-api-proxy makes it easy to run Golang APIs written with frameworks such as Gin with AWS Lambda and Amazon API Gateway.

Amazon Web Services - Labs 588 Jan 20, 2022
💾 Wolke API is the API behind Wolke image storage and processing aswell as user management

?? Wolke API Wolke API is the API behind Wolke image storage and processing aswell as user management Deploying To deploy Wolke Bot you'll need podman

wolke.casa 1 Dec 21, 2021
A GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way

TEMPORARY REPOSITORY This repo will exist only temporarily waiting for the PR has been merged.

null 0 Nov 5, 2021
A complete and simple wrapper for the Hypixel API

Gopixel A simple and complete1 wrapper for the hypixel API Key features Full API coverage1 Autocomplete for fields Near complete structs MIT license I

null 3 Jan 4, 2022
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.

tutor-pet API Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure. Macro architecture: Code architecture: Pre-Re

Lucas Ferreira 1 Jan 8, 2022
Go library for accessing the MyAnimeList API: http://myanimelist.net/modules.php?go=api

go-myanimelist go-myanimelist is a Go client library for accessing the MyAnimeList API. Project Status The MyAnimeList API has been stable for years a

Stratos Neiros 26 Dec 30, 2021