DEV Community

Sekti Wicaksono
Sekti Wicaksono

Posted on

How to Allow Your JavaScript Web App to Be Accessed by Other Devices on Windows

Recently, I encountered an issue where a Next.js/React app running in development on Windows could not be accessed from other devices.
After adjusting the firewall settings, the solution was simply to allow the application (node.exe) to communicate through the firewall, enabling access from other devices on the same network.

  1. Go to Windows Settings -> Search Firewall
    Click Firewall & Network Protection -> Allow an apps... -> Change settings -> check node.exe -> OK
    Nodejs on Windows Firewall Setup ImageBetter Size Image

  2. Run your app on VSCode
    e.g: npm run dev / pnpm dev

  3. Try accessing it via the ip_address:port shown in the terminal.
    Then, from another device (phone or computer) connected to the same access point (AP) or network, open the app in a browser.
    For example, open Chrome on your mobile device and navigate to http://192.168.0.6:3000

Top comments (0)