DEV Community

Discussion on: NodeJS/ReactJS: Change HOST AND Port Number

Collapse
 
remo87 profile image
remo87

I'm getting this exception while running npm start 'HOST' is not recognized as an internal or external command, I've tried running it using powershell cmd and git bash

Collapse
 
kevinmel2000 profile image
Teddy Zugana

In Linux and Mac terminals, it would be

$export PORT=5000
$export HOST=IP ADDRESS

In Windows, the command is slightly different

$env:PORT=5000
$env:HOST=IP ADDRESS

make sure HOST is register in your environment OS