Languages

React - how to open application on mobile device in local network? (Windows 10 / Android)

3 points
Asked by:
Lani-Skinner
748

How can I open application running on localhost:3000 on mobile device?

I wanted to check how mobile camera works in my project and I was wondering how can I do this.

1 answer
3 points
Answered by:
Admin Dirask Community
4380

1. Run react app

Simply run the application using npm start command.

2. Check your computer IP

  1. Open Command Prompt,
  2. Use ipconfig command,
  3. Search for Wireless LAN adapter Wi-Fi section and find IPv4 Address (e.g. 192.168.1.29).

3. Open on mobile device

Open web browser on your mobile device and use your computer's IPv4 address with the port number (the number that goes after localhost:, usually 3000) as the URL.

Practical example:

Where:

  • 192.168.1.29 - is IPv4 Address of the computer that runs the React app,
  • 3000 - is number of the port that React app is running on.
0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join