I'm launching a server with the following script (arranca_server.sh)
# Arranca servidor Node
export NODE_ENV=development-curso
export NODE_PORT=9001
export NODE_HOST=127.0.0.1
node server
And Node returns:
> events.js:160
> throw er; // Unhandled 'error' event
> ^
>
> Error: getaddrinfo ENOTFOUND 127.0.0.1
> at errnoException (dns.js:28:10)
> at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
Node version:
$ node -v
v6.11.2
S.O. Windows 7 32 bits
What have I tried?
127.0.0.1 localhost
in c:\windows\system32\drivers\etc\hostsAny ideas?
SOLVED
In my case I have solved it by changing my file arranca_server.sh
# Arranca servidor Node
export NODE_ENV=development-curso
export NODE_PORT=9001
export NODE_HOST=127.0.0.1
node server
by this other arranca_server.bat
# Arranca servidor Node
SET NODE_ENV=development-curso
SET NODE_PORT=9001
SET NODE_HOST=127.0.0.1
node server