rn-dev-url - Project screenshot showing A tiny React Native / Expo dev tool that automatically resol

rn-dev-url

TypeScriptReact NativeExpoNode.jsDeveloper ToolsDXnpm

A tiny React Native / Expo dev tool that automatically resolves the correct API URL across emulator, simulator, and devices — without exposing LAN IPs or breaking production.

I built rn-dev-url after repeatedly hitting the same annoying problem while developing mobile apps — API calls would work fine on the iOS simulator, break on the Android emulator, and behave differently on real devices. Most of the time, I wasn’t debugging my app — I was debugging networking, localhost rules, and environment setups.

The core issue was that every platform treats localhost differently (127.0.0.1 on iOS, 10.0.2.2 on Android, LAN IP on devices), which leads to broken API calls, confusing .env switching, and onboarding friction for teammates. I wanted a small, predictable solution instead of more hacks and conditionals.

What I Built

rn-dev-url automatically resolves the correct API base URL in development based on where the app is running (emulator, simulator, or physical device), and safely falls back to a remote or staging API when needed — while refusing to run smart detection in production.

Why It Matters

  • Eliminates constant switching between localhost, 10.0.2.2, and LAN IPs
  • Reduces onboarding friction and device-only debugging issues
  • Makes development behavior predictable instead of environment-dependent
  • Designed with strict production safety — LAN IPs are never exposed
  • Prefers boring, explicit behavior over “clever” hidden logic

Built & Shipped

Lightweight TypeScript library published to npm, tested across Expo, React Native CLI, Android emulator, iOS simulator, and real devices. Built as a focused DX tool to remove everyday friction rather than add complexity.

Live Preview
2026 — Built by Shahnoor Mujawar