Created
September 10, 2019 16:31
-
-
Save gpDA/51b3018316873264fb5f10c0804927f2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import Amplify, { API } from 'aws-amplify'; | |
| Amplify.configure({ | |
| Auth: { | |
| // REQUIRED - Amazon Cognito Identity Pool ID | |
| identityPoolId: 'XXXXX', | |
| // REQUIRED - Amazon Cognito Region | |
| region: 'us-east-1', | |
| // OPTIONAL - Amazon Cognito User Pool ID | |
| userPoolId: 'XXXXX', | |
| // OPTIONAL - Amazon Cognito Web Client ID | |
| userPoolWebClientId: 'XXXX', | |
| mandatorySignIn: true, | |
| }, | |
| API: { | |
| endpoints: [ | |
| { | |
| name: "XXXX", | |
| endpoint: `https://XXXX.us-east-1.amazonaws.com/${version_input}`, | |
| custom_header: async () => { | |
| return { | |
| 'Content-Type': 'application/json', | |
| 'Accept': 'application/json' | |
| } | |
| } | |
| }, | |
| { | |
| name: "XXXX", | |
| endpoint: `https://XXXX.us-east-1.amazonaws.com/${version_input}`, | |
| }, | |
| ] | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment