0
Ich bin neu bei RN und versuche herauszufinden, wie ich umgebungsspezifische Konfiguration verwenden kann.Wie gehe ich mit der Umgebungskonfiguration in reaktiv-nativ zu Punkt bei DEV/TEST/Produktion um?
Zum Beispiel kann der Code, den ich habe meinen Server API schlagen muss auf die Umwelt anhand ändern
const endpoint = "http://localhost:8282/api/v1/auth/"
//staging endpoint "http://staging:8282/api/v1/auth"
//production endpoint "http://production:8282/api/v1/auth"
export default {
login(fbId,fbAccessToken,expiresIn){
return fetch(endpoint + 'login', {
method: 'post',
body: JSON.stringify({
fb_id: fbId.toString(),
access_token:fbAccessToken,
expires:expiresIn.toString()
})
})
}
}