3
0
Fork 0
No description
Find a file
mapiedra34 b70a9724b8 Convert CLICHE to Go app
Serve the app with a Go backend and load commands from PostgreSQL via /api/commands instead of static docs/data catalogs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-30 10:54:50 -05:00
.github/workflows Change artifact upload path for GitHub Pages 2025-11-19 09:39:42 -06:00
cmd/cliche Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00
internal/app Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00
public Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00
go.mod Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00
go.sum Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00
README.md Convert CLICHE to Go app 2026-04-30 10:54:50 -05:00

CLICHE

CLICHE is now served by a Go web app instead of a static Live Server workflow.

Run locally

go run .\cmd\cliche

The app listens on :8081 by default and serves public\index.html plus static assets from public\.

Commands database

Commands are loaded from the Go backend endpoint:

GET /api/commands?limit=1000

The backend reads from PostgreSQL when CLICHE_DATABASE_URL is set. It also accepts HUB_DB or standard PGHOST, PGUSER, PGPASSWORD, PGDATABASE, PGPORT, and PGSSLMODE environment variables. Command rows are read from commands.command_definitions, with a fallback to command_definitions.

Hosting

The frontend is host-ready: it calls the same-origin backend path /api/commands?limit=1000, so it is not wired to localhost.

Required hosting settings:

CLICHE_DATABASE_URL=postgres://user:password@host:5432/database?sslmode=require

Optional hosting settings:

CLICHE_ADDR=:8081
PORT=8081
CLICHE_STATIC_DIR=public

CLICHE_ADDR wins when set. Otherwise the app uses PORT, which many hosting platforms inject automatically, and falls back to :8081 for local development.

Before exposing it publicly, put it behind your normal auth or network boundary. The current app serves /api/commands without built-in authentication.