Skip to content

Docs incorrectly suggest remix-serve --port 5000 ./build/index.js #7830

Open
@jakubmazanec

Description

@jakubmazanec

What version of Remix are you using?

2.1

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

  1. Create new Remix app using npx create-remix@latest --template remix-run/remix/templates/fly, install dependencies, build the app.
  2. Run npx remix-serve ./build/index.js --port 5000.
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions