How npm start runs a server on port 8000

user3724677 picture user3724677 · Jul 15, 2014 · Viewed 385.2k times · Source

I recently used a angular-seed folder from github for angular application development. In some previous angularjs tutorial there was a script folder and a server.js file in the angular-seed folder which had all the configuration for running the node server. So how does npm now just start running a node server and where is all the configuration of that node server?

Answer

YeeHaw1234 picture YeeHaw1234 · Jun 10, 2017

We have a react application and our development machines are both mac and pc. The start command doesn't work for PC so here is how we got around it:

"start": "PORT=3001 react-scripts start",
"start-pc": "set PORT=3001&& react-scripts start",

On my mac:

npm start

On my pc:

 npm run start-pc