Categories
React Native Answers

How to set the port of a React Native app?

Spread the love

To set the port of a React Native app, we can set the port option when we run our app.

From the command line, we run

react-native start --port 9988

to set the port to 9988

In package.json, we can add the port by writing

{
  "scripts": { "start": "react-native start --port 9988" }
}

to add the port option into the start script.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.