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
As documented in https://remix.run/docs/en/main/other-api/dev#setting-a-custom-port, remix dev uses the --port flag to configure the hot update port. This diverges from the majority of other JS frameworks that include a dev server, which have typically stuck to the convention of using --port to specify the port the application is running on (examples: Vite, Next.js, Vue, Angular, Svelte, Astro, Gatsby, create-react-app, and likely others).
By going against this convention with remix dev, I'd argue there's risk of needless confusion for new developers coming from any of these other tools. Beyond that, Remix itself already overloads the --port term to refer to the application port with remix-serve. It's true that they are technically separate commands, but because remix dev calls out to remix-serve by default, the lines are blurred, and it feels like the kind of subtle distinction that isn't helpful for people to have to remember. There's a paragraph in the docs needed just to clarify the difference between the two usages of the same flag.
So the proposal here is just renaming the remix dev --port flag to something more specific that indicates its purpose- for example, remix dev --hot-update-port. Going one further, it'd also be nice to add a more familiar --port flag which sets the app port, but that's less necessary if there isn't the pitfall of the existing flag anymore.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As documented in https://remix.run/docs/en/main/other-api/dev#setting-a-custom-port,
remix dev
uses the --port flag to configure the hot update port. This diverges from the majority of other JS frameworks that include a dev server, which have typically stuck to the convention of using --port to specify the port the application is running on (examples: Vite, Next.js, Vue, Angular, Svelte, Astro, Gatsby, create-react-app, and likely others).By going against this convention with
remix dev
, I'd argue there's risk of needless confusion for new developers coming from any of these other tools. Beyond that, Remix itself already overloads the--port
term to refer to the application port withremix-serve
. It's true that they are technically separate commands, but becauseremix dev
calls out to remix-serve by default, the lines are blurred, and it feels like the kind of subtle distinction that isn't helpful for people to have to remember. There's a paragraph in the docs needed just to clarify the difference between the two usages of the same flag.So the proposal here is just renaming the
remix dev --port
flag to something more specific that indicates its purpose- for example,remix dev --hot-update-port
. Going one further, it'd also be nice to add a more familiar--port
flag which sets the app port, but that's less necessary if there isn't the pitfall of the existing flag anymore.Beta Was this translation helpful? Give feedback.
All reactions