forked from TwilioDevEd/client-quickstart-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
28 lines (22 loc) · 859 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const dotenv = require('dotenv');
const cfg = {};
if (process.env.NODE_ENV !== 'test') {
dotenv.config({path: '.env'});
} else {
dotenv.config({path: '.env.example', silent: true});
}
// HTTP Port to run our web application
cfg.port = process.env.PORT || 3000;
// Your Twilio account SID and auth token, both found at:
// https://www.twilio.com/user/account
//
// A good practice is to store these string values as system environment
// variables, and load them from there as we are doing below. Alternately,
// you could hard code these values here as strings.
cfg.accountSid = process.env.TWILIO_ACCOUNT_SID;
cfg.twimlAppSid = process.env.TWILIO_TWIML_APP_SID;
cfg.callerId = process.env.TWILIO_CALLER_ID;
cfg.apiKey = process.env.TWILIO_API_KEY;
cfg.apiSecret = process.env.TWILIO_API_SECRET;
// Export configuration object
module.exports = cfg;