Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/nicolito128/tasks-api
- Owner: nicolito128
- License: mit
- Created: 2022-03-27T22:59:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T20:06:10.000Z (over 2 years ago)
- Last Synced: 2024-10-08T13:30:56.121Z (about 1 month ago)
- Topics: api, database, gin, go, golang, postgresql, sql
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/pqSet 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