Variable d'environnement pour l'URL du serveur API

This commit is contained in:
2024-12-10 08:43:25 +01:00
parent 4da75e310e
commit 72862da3a6
3 changed files with 7 additions and 2 deletions

View File

@ -23,7 +23,7 @@ export default function Login() {
if (loggingIn)
return
setLoggingIn(true)
const resp = await fetch("http://192.168.1.198:3000/auth/login/", {
const resp = await fetch(`${process.env.EXPO_PUBLIC_TRAINTRAPE_MOI_SERVER}/auth/login/`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: name, password: password })