-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use .env for server address in example app (#51)
android emu specific url
- Loading branch information
1 parent
12b783e
commit 0f161e6
Showing
8 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
API_URL_ANDROID=http://10.0.2.2:3002 | ||
API_URL_IOS=http://localhost:3002 | ||
|
||
# Fill in your private TEST API key below | ||
STRIPE_PRIVATE_KEY=sk_test_xxx | ||
|
||
# Backend API URL | ||
API_URL=http://127.0.0.1:3002 | ||
|
||
# Android Backend API URL. | ||
# The example app will default to API_URL if no specific API_URL_ANDROID is defined | ||
# This is helpful when you're working with the android emulator as it remaps the localhost | ||
# ip value (default is 10.0.2.2) | ||
API_URL_ANDROID=http://10.0.2.2:3002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
export const API_URL = 'https://stripe-backend-danwaters.herokuapp.com'; | ||
// @ts-ignore | ||
import { API_URL as defaultURL, API_URL_ANDROID as androidURL } from '@env'; | ||
import { Platform } from 'react-native'; | ||
|
||
export const API_URL: string = | ||
Platform.OS === 'android' && androidURL ? androidURL : defaultURL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters