Hey <@U016L1UCXPX> Please just create one thread....
# server
z
Hey @Cheenu Soni Please just create one thread. It will be easy for others to reply.. Have you tried localhost:8080? And also, you have to put a routing for "/" and respond something..
@Cheenu Soni Reply here..
c
I have tried localhost:8080 and 27.0.0.1:8080. Also, I am responding "Hello World"
image.png
j
Do you get some logging on startup? Also, to confirm, loopback IP is 127.0.0.1 but I suspect 27.0.0.1 is just a typo
v
And 0.0.0.0 will never work in the browser, it is just for listening to listen on all interfaces, so that it reacts to localhost and also all external ip addresses.
☝️ 1
c
Also, to confirm, loopback IP is 127.0.0.1 but I suspect 27.0.0.1 is just a typo
Yes, It was a typo in my comment here. Anyway, now both localhost:8080 and 127.0.0.1:8080 seem to work. Idk what this is.
And 0.0.0.0 will never work in the browser,
I tried
curl <http://0.0.0.0:8080/>
It gave the output
curl: (7) Failed to connect to 0.0.0.0 port 8080: Address not available
I am not sure if I am using the right curl command though. Sorry, for silly questions. I am very new to website development.
👍 1
z
Great to hear it's working now.. 👍
🙌 1
c
Anyway I am using
localhost:8080
for now.
v
Did you actually read my comment?
In the
curl
case
curl
is the browser
Replace "browser" with "any client"
c
oh, I didnt know
curl
is a browser too.
Replace "browser" with "any client"
ok
v
Your machine usually listen to at least the IP 127.0.0.1 for local connections and one more external IP how to access your machine from the outside. There can be additional IPs for example if you are connected to a VPN and so on. If you listen to incoming connections, you have to specify which IPs to listen on. If you specify
0.0.0.0
or simply
0
that means you want to listen on all of them, but it is not a valid IP you can connect to.
👍 1