Files
api_tmpl/api.env.example
T
FernandoJVideira c4ee0ce4dc chore: rename simple_bank to api_tmpl and clean up for template use
Rename the module, proto service, and all identifiers from simple_bank/
SimpleBank to api_tmpl/ApiTmpl, and regenerate the gRPC/gateway/swagger/
mock code accordingly.

- Scrub real secrets (SMTP password, auth token secret) from api.env/
  api_test.env, untrack them, and add api.env.example/api_test.env.example
- Remove committed build artifacts (tmp/main, tmp/build-errors.log,
  dbml-error.log) and gitignore them going forward
- Fix Dockerfile paths (build target, migrations copy) that referenced a
  stale project layout
- Rewrite README to match the actual cmd/ + internal/ structure and add a
  "using this as a template" section
2026-08-25 03:02:37 +01:00

46 lines
1.1 KiB
Bash

PKG_NAME=github.com/FernandoJVideira/api_tmpl
PROJ_NAME=api_tmpl
SERVICE_NAME="API Template"
# Server Configuration
HTTP_SERVER_ADDR=:8080
GRPC_SERVER_ADDR=:9090
EXTERNAL_URL=localhost:8080
FRONTEND_URL=http://localhost:5173
ENVIRONMENT=development
ALLOWED_ORIGINS=https://*,http://* # TODO: Change to the actual allowed origins on production
# Database Configuration
DB_ADDR=postgres://postgres:postgres@localhost:5432/api_tmpl?sslmode=disable
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_MAX_OPEN_CONNS=30
DB_MAX_IDLE_CONNS=30
DB_MAX_IDLE_TIME=15m
MIGRATIONS_URL=file://cmd/db/migrations
# Redis Configuration
REDIS_ADDR=localhost:6379
REDIS_PASSWORD=
REDIS_DB=0
# Authentication
AUTH_TOKEN_SECRET=changeme-replace-with-a-random-secret-at-least-32-chars
AUTH_TOKEN_MIN_KEY_SIZE=32
AUTH_TOKEN_EXP=15m
REFRESH_TOKEN_EXP=168h
AUTH_TOKEN_ISS=api_tmpl
AUTH_TOKEN_AUD=api_tmpl
# Email Configuration
EMAIL_FROM=[email protected]
EMAIL_FROM_NAME=API Template
EMAIL_SMTP_PASSWORD=changeme-smtp-app-password
# Rate Limiter
RATE_LIMITER_REQS_COUNT=20
RATE_LIMITER_TIME_FRAME=1m
RATE_LIMITER_ENABLED=true