Skip to content

Symfa-Inc/meals-api

Repository files navigation

Create .env file from .env.example

cp .env.example .env

Install all Go dependencies

go get -v ./...

Generate and update swagger docs

go get -u github.com/swaggo/swag/cmd/swag
swag init

Dockerization

docker-compose up -d

How to

Run migrations and seeds
go run db/migrate.go
Run tests

install godotenv on your machine

go get github.com/joho/godotenv/cmd/godotenv

and then run tests with godotenv command

godotenv go test ./... -count=1

use flag -count=1 to clear cache

Run linter
go fmt ./...

Run project with live reload

go get -u github.com/cosmtrek/air
type "air" in your command-line

Without live reload

go run main.go

About

Golang source code example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5