EN
React - how to open application on mobile device in local network? (Windows 10 / Android)
1 answers
3 points
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
1. Run react app
Simply run the application using npm start
command.
2. Check your computer IP
- Open Command Prompt,
- Use
ipconfig
command, - 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:
xxxxxxxxxx
1
http://192.168.1.29:3000/
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 commentsShow commentsAdd comment