Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

set port in react app

//in package.json

"start": "react-scripts start"
t0
//linux
"start": "PORT=3006 react-scripts start"
or 
"start": "export PORT=3006 react-scripts start"
//windows
"start": "set PORT=3006 && react-scripts start"

Comment

how to give port for react application

//If you don't want to set the environment variable, another option is to modify the scripts part of package.json from:

"start": "react-scripts start"
//to

//Linux (tested on Ubuntu 14.04/16.04) and MacOS (tested by aswin-s on MacOS Sierra 10.12.4):

"start": "PORT=3006 react-scripts start"
//or (may be) more general solution by IsaacPak

"start": "export PORT=3006 react-scripts start"
//Windows 

"start": "set PORT=3006 && react-scripts start"
Comment

react port

// Ubuntu / CentOS / RHEL / MacOS environment:

...
  "scripts": {
    "start": "PORT=8000 react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-app-rewired eject"
  }
...
Comment

how to change port in react js

PORT=5010 react-scripts start
Comment

react port

#Create a .env file at your project root and specify port number there. Like:
PORT=3005
Comment

PREVIOUS NEXT
Code Example
Javascript :: js math function that returns smallest value 
Javascript :: javascript convert string with square brackets to array 
Javascript :: js convert string array to number array 
Javascript :: remove undefined from object js 
Javascript :: form.select not working react bootstrap 
Javascript :: how to use axios get 
Javascript :: what is virtual dom in react 
Javascript :: how to submit form on changed url in function in jquery 
Javascript :: js loading spinner 
Javascript :: ngrok live port vue js 
Javascript :: send mail, nodemailer, nodemailer, mailer, nodemailer npm 
Javascript :: build url query string javascript 
Javascript :: window.print filename 
Javascript :: assign array to another array javascript 
Javascript :: how to hide ascending descending icons in datatable js 
Javascript :: how to check password and confirm passwor in joi 
Javascript :: set cookie using nest js 
Javascript :: useeffect react example 
Javascript :: how to design an api node js 
Javascript :: javascript array.find 
Javascript :: next js page loader 
Javascript :: node js and react js difference 
Javascript :: clear the command prompt node 
Javascript :: react native vector icons 
Javascript :: loadtest node 
Javascript :: create select option using jquery 
Javascript :: Redirect to any page after 5 seconds in Javascript 
Javascript :: jshint ignore line 
Javascript :: how to update angular core in ionic 
Javascript :: js associative array push 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =