Explain the SSL failure instead of just reporting it

A Postgres URL without an sslmode made lib/pq ask for TLS and die with
"SSL is not enabled on the server", which reads like a server fault when
it is really a connection-string default. The error now says what to
append, and the server retries briefly so a deploy is not marked
unhealthy just because Postgres was still starting.

The sync server URL also defaults to the hosted instance now, so a fresh
install needs no setup.
This commit is contained in:
2026-10-08 10:38:54 +08:00
parent c0dd211ee5
commit 1bd346ce20
5 changed files with 76 additions and 14 deletions
+4 -1
View File
@@ -40,7 +40,10 @@ clicking an item copies it back to the clipboard.
a global queue); only the store append hops back to main.
- `Sources/Prompt/SyncService.swift` — optional sync client. Holds the group
code and server URL in `UserDefaults` (`sync.code`, `sync.serverURL`,
`sync.version`), pushes the whole store as JSON, and polls every 5s.
`sync.version`). The URL defaults to `SyncService.defaultServerURL`
(`https://prompt.tzgyn.dev`); nothing is sent anywhere until a code exists,
because polling only runs when one is set. Pushes the whole store as JSON and
polls every 5s.
- `Server/main.go` — the Go sync backend (single file, `net/http` + `lib/pq`).
Also ships `Server/Dockerfile` (static binary on distroless) and
`Server/README.md` (self-hosting). Logs one line per request, creates its