Preview site on same network, what am I doing wrong?

You know what got me confused? Please again, sorry if I'm not understanding this right

I'm working on a nodejs separated project, not from wappler.
So:

  1. With this:
const hostname = '127.0.0.1';
const PORT = process.env.PORT || 5000;

app.listen(PORT, hostname, () => console.log(`Corriendo en http://${hostname}:${PORT}`));

I can access ONLY from my computer.

  1. With this:
const hostname = '0.0.0.0';
const PORT = process.env.PORT || 5000;

app.listen(PORT, hostname, () => console.log(`Corriendo en http://${hostname}:${PORT}`));

I can access from ANY device.

  1. And If I start a Wappler node server which you say is a localhost

I can access from ANY device

You got my point?

1 Like