Skip to content

Problem when building localhost tunnel #8

@PYL2077

Description

@PYL2077

After I finished building the chat app following your awesome tutorial (with nodejs backend + react frontend), I could already access the app by using "localhost:3000" from my computer (or using "IP_Adress:3000" for devices on the same WLAN). Then, I attempted to access the app from outside of my local network, and I found on the Internet that I had to establish a localhost tunnel.

I used the free tunnels on localhost.run to establish a publicly-accessible URL, but the page reads that [this page is not working]. However, I can confirm that the tunnel was working properly since when I stopped the tunnel in my terminal, the [not working page] then reads [no tunnel here :( ]

I believe that the problem lies with the port number 3000. When I try to open tunnels for arbitrary localhost ports such as 1234 or 5555, the results were the same as before. However, when I opened a localhost tunnel for port 3001 (which is the only port refered to in the code), I get a page reading [Cannot GET /], which makes me wonder why the final actionable localhost is 3000 on my computer when the code has never referred to this port.

Two questions in summary

  1. Why does the app run on [localhost:3000] when the code only referred to port 3001
  2. How correctly establish the tunnel for the app's public internet access

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions