]> git.digitality.be Git - pdw25-26/commitdiff
"Mobile : Modification en.ts - refractor
authorThibaud Moustier <thibaudmoustier0@gmail.com>
Fri, 27 Feb 2026 22:00:03 +0000 (23:00 +0100)
committerThibaud Moustier <thibaudmoustier0@gmail.com>
Fri, 27 Feb 2026 22:00:03 +0000 (23:00 +0100)
Wallette/mobile/src/config/env.ts

index e394a9ba3e90d26318efd6c22ef74920439c9a77..57d42e82f662904b2b9eb158920791279201cd70 100644 (file)
@@ -1,37 +1 @@
-import { Platform } from "react-native";
-
-/**
- * env.ts
- * ------
- * Objectif : centraliser les URLs réseau pour le mobile.
- *
- * IMPORTANT (microservices + gateway) :
- * - Le mobile parle UNIQUEMENT au gateway : http://<HOST>:3000
- * - REST = http://<HOST>:3000/api/...
- * - Socket.IO = http://<HOST>:3000  (proxy /socket.io/* via gateway)
- *
- * Téléphone physique :
- * - <HOST> = IP du PC sur le Wi-Fi (ex: 192.168.x.x)
- *
- * Émulateurs (si un jour) :
- * - Android: 10.0.2.2
- * - iOS: localhost
- */
-
-const DEV_LAN_IP = "192.168.129.121";
-
-function resolveHost(): string {
-  // On part sur téléphone physique (ton cas).
-  // Si un jour tu testes sur émulateur Android, tu peux mettre une condition:
-  // if (Platform.OS === "android" && __DEV__ && isEmulator) return "10.0.2.2";
-  return DEV_LAN_IP;
-}
-
-// Base gateway (HTTP)
-export const GATEWAY_BASE_URL = `http://${resolveHost()}:3000`;
-
-// REST (via gateway)
-export const API_BASE_URL = `${GATEWAY_BASE_URL}/api`;
-
-// Socket.IO (via gateway)
-export const SERVER_URL = GATEWAY_BASE_URL;
\ No newline at end of file
+const DEV_LAN_IP = "192.168.129.121";
\ No newline at end of file