Skip to content

AlexNimoy/go-todo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo API Clear Architecture example

Swagger

http://localhost:8085/swagger/index.html

.env

POSTGRES_USER=develop
POSTGRES_PASSWORD=develop
POSTGRES_PORT=5436
POSTGRES_HOST=localhost
SERVER_PORT=8085

db migrate

install

brew install golang-migrate

https://github.com/golang-migrate/migrate

usage

migrate create -ext sql -dir ./schema -seq init

migrate up

make migrate_up

alias for

migrate -path ./schema -database 'postgres://develop:develop@localhost:5436/develop?sslmode=disable' up

migrate down

make migrate_down

alias for

migrate -path ./schema -database 'postgres://develop:develop@localhost:5436/develop?sslmode=disable' down

container psql console

make db_cli

alias for

docker-compose exec postgres psql -U develop

Sawagger

https://github.com/swaggo/swag

Generate docs

swag init -g cmd/server/main.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published