How to use custom port in local-dev?

An old thread - Run expo web on custom port? - #5 by nicholascm

Doesn’t work in the newer versions; In the expo-47 expo start --web --port <port> doesn’t affect the port number of web-dev-server.

Thanks.

Hi, I don’t see a way to set this currently using the default setup. However, you may want to try the Metro bundler option, as this would cause web to use the same port as native, which can be customized with --port.

1 Like

Thanks for your reply.

And yep, couldn’t find something similar in the default setup. The metro-bundler is quite experimental (as the docs suggest) to add to prod for now.

Btw, for now, the global expo-cli works too. But it isn’t a documented or recommended way to work with web in newer versions as per the docs.