Document LAN-IP access for testing the backend from a physical device
The api service already binds 0.0.0.0:8000 via docker-compose, so it's reachable from other devices on the same network without extra config. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
c5596870fb
commit
3f5a857c5a
2 changed files with 12 additions and 4 deletions
11
README.md
11
README.md
|
|
@ -43,6 +43,11 @@ curl "http://localhost:8000/api/v1/nearby?lat=55.7525&lon=37.6231"
|
|||
Swagger UI: http://localhost:8000/docs
|
||||
Adminer (DB inspection): http://localhost:8080
|
||||
|
||||
The `api` service binds `0.0.0.0:8000` (see `docker-compose.yml`), so it's
|
||||
also reachable from other devices on the same LAN at
|
||||
`http://<this-machine's-LAN-IP>:8000/` — no extra config needed, just make
|
||||
sure nothing (firewall, VPN) blocks port 8000 on that interface.
|
||||
|
||||
## Android quickstart
|
||||
|
||||
```bash
|
||||
|
|
@ -51,8 +56,10 @@ cp android/local.properties.example android/local.properties
|
|||
cd android && ./gradlew :app:assembleDebug
|
||||
```
|
||||
|
||||
Point the app's API base URL at `http://10.0.2.2:8000/` for the emulator, or
|
||||
your machine's LAN IP for a physical device.
|
||||
Point the app's API base URL (`API_BASE_URL` in `local.properties`) at
|
||||
`http://10.0.2.2:8000/` for the emulator, or your machine's LAN IP
|
||||
(e.g. `http://192.168.8.173:8000/`) for a physical device on the same
|
||||
Wi-Fi/LAN.
|
||||
|
||||
## Notes / current scope
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@ DGIS_API_KEY=b4df01a8-61db-4cb9-8286-7e069495987d
|
|||
|
||||
# Base URL of the guideCity backend API.
|
||||
# Emulator -> host loopback: http://10.0.2.2:8000/
|
||||
# Physical device -> your machine's LAN IP, e.g. http://192.168.1.50:8000/
|
||||
API_BASE_URL=http://10.0.2.2:8000/
|
||||
# Physical device on the same Wi-Fi/LAN -> your machine's LAN IP, e.g. http://192.168.1.50:8000/
|
||||
# (backend already binds 0.0.0.0:8000 via docker-compose, so it's reachable on the LAN IP with no extra config)
|
||||
API_BASE_URL=http://192.168.8.173:8000/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue