nuejs / create-nue

A recommended way to start a Nue project
https://nuejs.org
139 stars 30 forks source link

Get and display network IP address in server #11

Closed muratpurc closed 12 months ago

muratpurc commented 1 year ago

This comes in handy if you run the app within a virtual maschine or a container but need to access it from the host.

tipiirai commented 1 year ago

Thanks! Possible to edit the code so that there is no " or " sentence? Just show the address and port that is in use.

muratpurc commented 1 year ago

Your welcome. The ' or ' part has been removed, the output now looks like this:

Node HTTP server at http://127.0.0.1:8080/ http://x.x.x.x:8080/

(where x.x.x.x is the IP of your container or vm)

By the way, NueJS is a great project, I wish you much success with it.

tipiirai commented 12 months ago

So we need to display both addresses and not just the other one when found? (Sorry, not familiar with containers)

And unfortunately, this now creates a conflict after merging #16! Can I ask you to update this one more time? 🙏

By the way, NueJS is a great project, I wish you much success with it.

Thanks a lot! Good to hear.

tipiirai commented 12 months ago

Thank you!