diff --git a/.changeset/eighty-hounds-juggle.md b/.changeset/eighty-hounds-juggle.md new file mode 100644 index 000000000000..7842fd495fd5 --- /dev/null +++ b/.changeset/eighty-hounds-juggle.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': minor +--- + +fix: added SOCKET_PATH env variable description in docs diff --git a/documentation/docs/25-build-and-deploy/40-adapter-node.md b/documentation/docs/25-build-and-deploy/40-adapter-node.md index 575c6b5296df..b377d07954b9 100644 --- a/documentation/docs/25-build-and-deploy/40-adapter-node.md +++ b/documentation/docs/25-build-and-deploy/40-adapter-node.md @@ -49,7 +49,7 @@ 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: @@ -57,6 +57,12 @@ By default, the server will accept connections on `0.0.0.0` using port 3000. The 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: