module
0.0.0-20240710140733-2dbcfd2b2682
Repository: https://github.com/seacloudhub/backend.git
Documentation: pkg.go.dev
# README
Template for go team
Development
Init local environment
-
Copy file
.env.example
and rename to.env
-
Update env vars to fit your local
-
Start local services
make db
-
Run the migration
make migrate
-
Create admin account
make seed
-
Run the server
make run
-
Run the thumbnail service
make thumbnail
-
Unit test
make test
Linting
make lint
Create new migration file
sql-migrate new -env="development" create-users-table
- Result:
Created migration migrations/20230908204301-create-users-table.sql
Swagger
-
Access to
{host}/swagger/index.html
-
Install swag CLI
go install github.com/swaggo/swag/cmd/swag@latest
- Generate swagger docs
make swagger