Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sunmadeq/todo

A minimal To-Do application built with Go
https://github.com/sunmadeq/todo

clear-ar docker docker-compose dockerfile gin go golang golang-api golang-jwt golang-migrate golang-rest jwt jwt-authentication rest-api sql

Last synced: about 1 month ago
JSON representation

A minimal To-Do application built with Go

Awesome Lists containing this project

README

        

# A minimal REST API for creating To-Do Lists

## The project covers the following concepts:
- developing web applications in Go, following the REST API design;
- working with the gin-gonic/gin framework;
- the Clean Architecture approach to building the application structure;
- dependency injection technique;
- working with the PostgreSQL database;
- working with Docker;
- generating migration files;
- configuring the app using the spf13/viper library;
- working with environment variables;
- authentication and authorization using JSON Web Tokens (JWTs) and Middleware;
- writing SQL queries;
- graceful shutdown.

## To run the application:

Install Docker Desktop and run the following command:

```
docker compose up
```

Install the Migrate utility and apply existing migrations to the database:

```
migrate -path ./schema -database "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" up
```

Run the application:

```
go run ./cmd/main.go
```