35 lines
554 B
Markdown
35 lines
554 B
Markdown
# Unit Tracker API
|
|
|
|
## Configure
|
|
|
|
1. Copy `.env.example` to `.env`
|
|
1. Set the environment variables in `.env`
|
|
|
|
## Run
|
|
|
|
1. Put your static files in the `static` folder
|
|
1. Run the server
|
|
|
|
### Docker
|
|
|
|
```docker
|
|
# Startup
|
|
docker compose -f "docker-compose.yaml" up -d --build
|
|
# Shutdown
|
|
docker compose -f "docker-compose.yaml" down
|
|
```
|
|
|
|
### Build binary with Go toolchain
|
|
|
|
```powershell
|
|
go build -o unit-tracker-api.exe ./api
|
|
.\unit-tracker-api.exe
|
|
```
|
|
|
|
## Use
|
|
|
|
Example endpoints:
|
|
|
|
http://localhost:1323/api/v1/members
|
|
http://localhost:1323/api/v1/members/3
|