Open
Description
What version of Remix are you using?
2.1
Are all your remix dependencies & dev-dependencies using the same version?
- Yes
Steps to Reproduce
- Create new Remix app using
npx create-remix@latest --template remix-run/remix/templates/fly
, install dependencies, build the app. - Run
npx remix-serve ./build/index.js --port 5000
. - Observe the actual port number.
Also, npx remix-serve --port 5000 ./build/index.js
doesn't work at all.
Expected Behavior
According to this page https://remix.run/docs/en/main/other-api/dev#setting-a-custom-port, the app server should listen on the port I specified.
Actual Behavior
Port is random. Looking at the source code here https://github.com/remix-run/remix/blob/main/packages/remix-serve/cli.ts I see the port is only generated randomly, or taken from PORT
env var. Or am I missing something?