I using started working on React apps. When I try and start npm start
it tries to run on localhost.localdomain:3000
. node
gets the name from process.env.HOST
. I want to change the hostname
. How do I do it? (I guess I can simply change the configuration files for the React apps but I have to do it for every app.)
What I tried:
> sudo hostname pc0
> hostnamectl
Static hostname: n/a
Transient hostname: pc0
Still node tries to start the server on localhost.localdomain:3000
instead of desired ‘pc0:3000’.