React Native Run Different Port Example

04-Apr-2023

.

Admin

React Native Run Different Port Example

Hi Guys,

In this tutorial, you will learn react native run different port. I explained simply step by step how to run different port in react native. if you have question about how to change the port react native then I will give simple example with solution. This tutorial will give you simple example of how to specify a port to run in react native.

how to run a project different port in react native that's following steps.

Download Project


In the first step run the following command to create a project.

expo init Demo

Solution 1:

You can define direct port with expo server command, let's run below command:

expo start --port 8000

Output :

Solution 2:

In this step, You will open the Package.json file and put the code.

Package.json

{

"scripts": {

"start": "expo start --port 8000",

},

}

let's run app:

expo start --port 8000

Output :

It will help you...

#React Native