Add sample server env file
This commit is contained in:
@@ -37,6 +37,8 @@ Before starting the service, set `CHGRID_HOST_ORIGIN` in `server/.env` to the ex
|
|||||||
CHGRID_HOST_ORIGIN=https://example.com
|
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
|
## 3) Publish Client
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Defaults:
|
|||||||
- Client dev default is `localhost:5173`.
|
- Client dev default is `localhost:5173`.
|
||||||
- Auth requires `CHGRID_AUTH_SECRET` in environment.
|
- Auth requires `CHGRID_AUTH_SECRET` in environment.
|
||||||
- Browser-origin enforcement requires `CHGRID_HOST_ORIGIN` 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`).
|
- 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
|
## Quick Restarts
|
||||||
|
|||||||
2
server/.env.sample
Normal file
2
server/.env.sample
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CHGRID_AUTH_SECRET=replace-with-a-long-random-secret
|
||||||
|
CHGRID_HOST_ORIGIN=https://example.com
|
||||||
Reference in New Issue
Block a user