publicly accessible service (nodejs)

#1
Hello!
I'm new to this forum, and to windows, so please forgive me if i'm missing some guidelines

I'm trying to make a node server publicly accessible. The code is the simplest it can be, and works as expected on OSX and linux machines.
But somehow on windows, I can't get it to work.

What i've done:
1. install node js
2. create the directory, init npm, install the requirements (express)
3. copypaste the hello world code from here
4. modify the last line to make it serve on ip 0.0.0.0:
app.listen(8080, '0.0.0.0', () => console.log('Example app listening on port 8080!'))
5. open a browser (IE) and try to access http://0.0.0.0:8080

On the other systems, this works fine, but on windows, it doesn't.
I don't think this is a firewall issue, since it doesn't even work when trying from the "host" computer.

Am I missing something ?
I was thinking that maybe windows doesn't redirect 0.0.0.0 to localhost like linux and OSX does ?

Thanks for your help
 


bochane

Honorable Member
#2
I don't know that application, so I don't know the answer, but is not in general the localhost revered to as 127.0.0.1 or ::1 ?
 


#3
Hi!
Thanks for your answer. It did not directly solve the problem, but you made me check some things... that solved it.

Here is what happened:
- I started my server on 0.0.0.0 and expected it to be accessible
- Seeing it was not working, I tried to troubleshoot the issue by completely disabling the firewall
- It was still not working, so I troubleshooted further back: trying to reach 0.0.0.0 on the host. This
works on the systems i'm used to, but apparently windows does it differently: Accessing localhost
works (with the server setup on 0.0.0.0), but trying to access 0.0.0.0 in the browser doesn't

What I didn't realise was that the firewall has two "modules" (private / Guest or public network), and I only disabled one...

Sorry for spamming this forum for such a trivial mistake...
I guess I should buy myself a rubber duck !

Anyways, now it works. Thank you!
now I'll have to find the firewall settings, instead of just disabling it

cheers
 


#4
How do I mark this thread as solved?
 


bochane

Honorable Member
#5
First, welcome to this forum, I should have done that right from the beginning.

Thanks for telling us how you solved it. Great!
Hope that you keep returning to us.

And this forum has no solved marker.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top