LAN IP

The address your Wi-Fi router gives the laptop, such as 192.168.1.42. A phone on the same network reaches the API through it, because localhost on the phone means the phone. Find it on macOS with ipconfig getifaddr en0; it can change after a reconnect.

Minimal example

bash
ipconfig getifaddr en0
# 192.168.1.42  ->  http://192.168.1.42:8080

Learn this concept

Lesson 4.3 · Expo device networking

Used in exercises

Exercise 4.4 · Expo app shell