Add sample server env file

This commit is contained in:
Jage9
2026-03-08 20:56:41 -04:00
parent 78bc931cce
commit 6368187ee4
3 changed files with 5 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ Before starting the service, set `CHGRID_HOST_ORIGIN` in `server/.env` to the ex
CHGRID_HOST_ORIGIN=https://example.com
```
The expected env shape is also shown in [server/.env.sample](/home/jjm/code/chgrid/server/.env.sample).
## 3) Publish Client
```bash

View File

@@ -25,6 +25,7 @@ Defaults:
- Client dev default is `localhost:5173`.
- Auth requires `CHGRID_AUTH_SECRET` in environment.
- Browser-origin enforcement requires `CHGRID_HOST_ORIGIN` in environment.
- A starter env file is available at `server/.env.sample`.
- Saved login uses server-managed `HttpOnly` cookie (`chgrid_session_token`) via `GET /auth/session/set` and `GET /auth/session/clear` (both require `X-Chgrid-Auth-Client: 1`).
## Quick Restarts

2
server/.env.sample Normal file
View File

@@ -0,0 +1,2 @@
CHGRID_AUTH_SECRET=replace-with-a-long-random-secret
CHGRID_HOST_ORIGIN=https://example.com