Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/fr13n8/todo-app

Simple REST todo API server in GO ✔️
https://github.com/fr13n8/todo-app

crud docker docker-compose go golang graceful-shutdown jwt jwt-go rest rest-api restful-api service todo todoapp todolist todolist-app

Last synced: 13 days ago
JSON representation

Simple REST todo API server in GO ✔️

Awesome Lists containing this project

README

        

# REST API TODO in Go

## Development tools and principles
- Go Web Applications following the REST API Design
- Working with the framework gin-gonic/gin
- The Clean Architecture approach to building an application structure. Dependency injection technique
- Working with Postgres DB. Running from Docker. Generation of migration files
- Application configuration using the library spf13/viper. Working with environment variables
- Working with BD using the library: sqlx
- Auth with JWT(get and refresh) and middleware
- Write SQL queries
- Graceful Shutdown

### DEMO
todo-app

### How to run

```properties
make build && make run
```

If app startet first time need to run migrations

```properties
make migrate
```

### All commands

- Build
```properties
make build
```
- Run
```properties
make run
```
- Run Tests
```properties
make test
```
- Migrate up
```properties
make migrate_up
```
- Migrate down
```properties
make migrate_down
```
- Generate swagger documentation
```properties
make swag
```
- Generate mocks
```properties
cd pkg/service && go generate
```