-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from AdarshNaidu/unread-messages-and-mentions-…
…intents New Intents | Name Resolution | Intent Confirmation | Local Development | Interaction Model Update | AWS Lambda setup
- Loading branch information
Showing
14 changed files
with
2,844 additions
and
600 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
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,8 +1,25 @@ | ||
// Environment Variables | ||
const functions = require('firebase-functions'); | ||
|
||
module.exports = { | ||
SERVER_URL : functions.config().envariables.server_url, | ||
CLIENT_ID : functions.config().envariables.clientid, | ||
OAUTH_SERVICE_NAME : functions.config().envariables.oauth_service_name | ||
}; | ||
if (process.env.DEVELOPMENT) { | ||
// if code is running in local | ||
require('dotenv').config(); | ||
module.exports = { | ||
SERVER_URL: process.env.SERVER_URL, | ||
CLIENT_ID: process.env.CLIENT_ID, | ||
OAUTH_SERVICE_NAME: process.env.OAUTH_SERVICE_NAME | ||
} | ||
} else if(Boolean(process.env['AWS_LAMBDA_FUNCTION_NAME'])) { | ||
// if code is deployed in aws lambda function | ||
module.exports = { | ||
SERVER_URL: process.env.SERVER_URL, | ||
CLIENT_ID: process.env.CLIENT_ID, | ||
OAUTH_SERVICE_NAME: process.env.OAUTH_SERVICE_NAME | ||
} | ||
} else { | ||
// if code is deployed in firebase function | ||
const functions = require('firebase-functions'); | ||
module.exports = { | ||
SERVER_URL : functions.config().envariables.server_url, | ||
CLIENT_ID : functions.config().envariables.clientid, | ||
OAUTH_SERVICE_NAME : functions.config().envariables.oauth_service_name | ||
}; | ||
} |
Oops, something went wrong.