- Go 1.21 or higher
- MySQL Server
-
Clone the repository
-
Install dependencies (not necessary):
make setup
-
Set up environment variables by copying following
.env.exampleto.env:# .env.example # DB DB_DSN=root:1234@tcp(localhost:3306)/ # need tcp declaration DB_MAX_CONNS=25 DB_MAX_IDLE_CONNS=25 DB_CONN_MAX_LIFETIME=10m # Server PORT=8080 ENV=development # adjust logging level by environment # Auth AUTH_PROXY_URL=http://localhost:8080/validate
-
Run the development server with hot reload (auto install dependencies):
make dev
-
Build for production (auto install dependencies):
make build
-
Run server (auto install dependencies):
make run
after running the server, go to
http://localhost:8080/swagger/index.html