Download mobile/modules/engine/src/utils/configuredDevHost.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/configuredDevHost.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/modules/engine/src/utils/configuredDevHost.ts
-
curl -L -o configuredDevHost.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/configuredDevHost.ts
557 Bytes
| import {getConfigValues} from "../runtime/bootstrap" | |
| /** | |
| * Explicit Metro / laptop host override used by stale-URL rewrite and launch | |
| * failover. One source of truth so AppRegistry and decideDevLaunchRoute stay aligned. | |
| */ | |
| export function configuredDevHost(): string | undefined { | |
| const explicit = process.env.EXPO_PUBLIC_LOCAL_MINIAPP_HOST | |
| if (explicit) { | |
| try { | |
| return new URL(explicit).hostname | |
| } catch { | |
| if (/^[\w.-]+$/.test(explicit)) return explicit | |
| } | |
| } | |
| return getConfigValues().devServerHost?.() | |
| } | |