From 4bd410e7549ad1f438a51876866a985b71afa2c6 Mon Sep 17 00:00:00 2001 From: Kuba Aniszewski <46377510+jaqb8@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:55:45 +0200 Subject: [PATCH] docs: add `SOCKET_PATH` to `adapter-node` docs (#10484) --- .changeset/eighty-hounds-juggle.md | 5 +++++ documentation/docs/25-build-and-deploy/40-adapter-node.md | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/eighty-hounds-juggle.md 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: