Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicolito128/tasks-api

A simple API written in Go with Gin Web Framework and PostgreSQL.
https://github.com/nicolito128/tasks-api

api database gin go golang postgresql sql

Last synced: 17 days ago
JSON representation

A simple API written in Go with Gin Web Framework and PostgreSQL.

Awesome Lists containing this project

README

        

# Tasks API

A simple API written in Go with Gin Web Framework. The API use PostgreSQL as database.

## Deploy
Download the project:

git clone https://github.com/nicolito128/tasks-api

Get the following packages:

go get github.com/gin-gonic/gin
go get github.com/lib/pq

Set a "DATABASE_URL" environment variable. See .env.example for more information on how to configure the database.

Before running the server you can test the code:

go test -v ./...

Run server:

go run main.go

## Endpoints
You can play with some endpoints included here:

* GET: /tasks
* GET: /tasks/:id
* POST: /tasks
* PUT: /tasks/:id
* DELETE: /tasks/:id

## Interest links
* [gin-gonic/gin][1]

[1]: https://github.com/gin-gonic/gin