forked from aoberoi/OpenTokRTC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
30 lines (23 loc) · 1.15 KB
/
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
29
30
// configure your variables here
var config = {}
config.opentok = {};
config.db = {};
config.web = {};
config.middleware = {};
// OpenTok Credentials
config.opentok.key = process.env.TB_KEY || 'Your opentok key';
config.opentok.secret= process.env.TB_SECRET || 'Your opentok secret';
// Database configuration. Do not change if you do not plan to use redis
config.db.redis = false; // are you using redis?
config.db.REDISTOGO_URL = process.env.REDISTOGO_URL;
// optional middleware to support
config.middleware.p2p = /^\/.*p2p[^\/.]*(\.json)?$/; // urls matching regex will have p2p enabled sessions. Set to false to disable
config.middleware.json = /.*\.json$/; // urls matching regex will have json responses. Set to false to disable
config.middleware.reservations = [{ // reserved rooms. If you want specific rooms to use different opentok Credentials, set it here
key: process.env.TNW_KEY,
secret: process.env.TNW_SECRET,
roomName: "yourdemoroom"
}]; // reserved rooms. set to false to disable
config.web.port = process.env.PORT || 9393;
config.web.env = process.env.NODE_ENV || "development"; // environment, change to production
module.exports = config;