You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feels free to point it out if I understand something wrong. #2048 added the support for adapter-node to listen with path. However, because the port still defaults to be 3000 now. The path option would be ignored by node.js.
As specified in the node.js docs when the port option is specified, the path option would be ignored. Which means it would listen on port 3000 instead of the specified path. Moreover, it would break existing apps using the PORT environment variable to listening with path. Because in this overload the option.port option would be verified if it's actually a port instead of a path.
The hosting service I am using uses a proxy approach and it uses the PORT variable to pass the named pipe. So honestly, I don't even know the difference between path and port until it breaks. I tried changing the config to let the node adapter to read the PORT variable as a path but it doesn't work.
Reproduction
use a svelte kit app and change the config to this.
Describe the bug
Feels free to point it out if I understand something wrong. #2048 added the support for adapter-node to listen with path. However, because the port still defaults to be 3000 now. The path option would be ignored by node.js.
kit/packages/adapter-node/index.js
Line 65 in 9080b2a
the overload currently using is the options object one:
kit/packages/adapter-node/src/index.js
Line 11 in 9080b2a
As specified in the node.js docs when the port option is specified, the path option would be ignored. Which means it would listen on port 3000 instead of the specified path. Moreover, it would break existing apps using the
PORT
environment variable to listening with path. Because in this overload theoption.port
option would be verified if it's actually a port instead of a path.The hosting service I am using uses a proxy approach and it uses the
PORT
variable to pass the named pipe. So honestly, I don't even know the difference between path and port until it breaks. I tried changing the config to let the node adapter to read the PORT variable as a path but it doesn't work.Reproduction
use a svelte kit app and change the config to this.
build the app and run `SOME_PATH=foo node build. Go to localhost:3000 in the browser.
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: