han junyi
han junyi

Reputation: 53

Can not access in local server on mac by IP address with phone

  1. I create a web server on mac and I can view it on 127.0.0.1:5173.
  2. I make true that mac and my phone are in a same WiFi.
  3. I find mac's IP address by ifconfig: 192.168.3.255. website on mac
  4. But, it doesn't work on my phone when I type in 192.168.3.255:5173 in my phone's browser. ipaddress

Is there something wrong?

Upvotes: 3

Views: 737

Answers (2)

han junyi
han junyi

Reputation: 53

The main reason is that Vue3 use the tool: vite, when you need to open it on the phone by ip address, you should type "npm run vite --host".

The "--host" can expose it.

Upvotes: 1

r3ll1sh
r3ll1sh

Reputation: 11

Did you try the inet IP shown in this output? 192.168.3.13

Upvotes: 1

Related Questions