Skip to content

Commit 6c97b16

Browse files
committed
Fix docs about node build startup command (close #273)
1 parent 403623b commit 6c97b16

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/contribute.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,14 @@ The application is now running at `http://localhost:5173`.
7878
An alternative way to start fractal-web is
7979
```
8080
npm run build # corresponding to `vite build`, which creates a `build` folder
81-
node build
81+
ORIGIN=http://localhost:5173 PORT=5173 node build
8282
```
83-
note that the `node` command can include additional options, as described in https://kit.svelte.dev/docs/adapter-node#environment-variables.
84-
83+
note that the `node` command relies on some environment variables, and
84+
especially on `ORIGIN`:
85+
> HTTP doesn't give SvelteKit a reliable way to know the URL that is currently
86+
> being requested. The simplest way to tell SvelteKit where the app is being
87+
> served is to set the `ORIGIN` environment variable.
88+
> (https://kit.svelte.dev/docs/adapter-node#environment-variables-origin-protocolheader-and-hostheader)
8589
8690
## How to run static code analysis
8791

0 commit comments

Comments
 (0)