Skip to content

Commit

Permalink
docs: add SOCKET_PATH to adapter-node docs (#10484)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqb8 authored Aug 10, 2023
1 parent 118a3a6 commit 4bd410e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eighty-hounds-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': minor
---

fix: added SOCKET_PATH env variable description in docs
8 changes: 7 additions & 1 deletion documentation/docs/25-build-and-deploy/40-adapter-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,20 @@ npm install dotenv
+node -r dotenv/config build
```

### `PORT` and `HOST`
### `PORT`, `HOST` and `SOCKET_PATH`

By default, the server will accept connections on `0.0.0.0` using port 3000. These can be customised with the `PORT` and `HOST` environment variables:

```
HOST=127.0.0.1 PORT=4000 node build
```

Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the `SOCKET_PATH` environment variable, the `HOST` and `PORT` environment variables will be disregarded.

```
SOCKET_PATH=/tmp/socket node build
```

### `ORIGIN`, `PROTOCOL_HEADER` and `HOST_HEADER`

HTTP doesn't give SvelteKit a reliable way to know the URL that is currently being requested. The simplest way to tell SvelteKit where the app is being served is to set the `ORIGIN` environment variable:
Expand Down

0 comments on commit 4bd410e

Please sign in to comment.