-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.js
65 lines (55 loc) · 1.34 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
const oddcast = require('oddcast');
const oddworks = require('@oddnetworks/oddworks');
const redis = require('fakeredis').createClient();
// Require the stores and/or services you want to use
const redisStore = oddworks.stores.redis;
const redisSearchStore = oddworks.stores.redisSearch;
const identityService = oddworks.services.identity;
const catalogService = oddworks.services.catalog;
const ENVIRONMENT = process.env.NODE_ENV || 'development';
const PORT = process.env.PORT || 3000;
const JWT_SECRET = process.env.JWT_SECRET || 'secret';
const SEED_SCRIPT = process.env.SEED_SCRIPT || undefined;
module.exports = {
env: ENVIRONMENT,
seedScript: SEED_SCRIPT,
express: {
port: PORT,
jwtSecret: JWT_SECRET
},
oddcast: {
events: {
options: {},
transport: oddcast.inprocessTransport()
},
commands: {
options: {},
transport: oddcast.inprocessTransport()
},
requests: {
options: {},
transport: oddcast.inprocessTransport()
}
},
stores: [
{
store: redisStore,
options: {redis, types: ['channel', 'platform', 'collection', 'promotion', 'video', 'view', 'user']}
},
{
store: redisSearchStore,
options: {redis, types: ['collection', 'video']}
}
],
services: [
{
service: identityService,
options: {jwtSecret: JWT_SECRET}
},
{
service: catalogService,
options: {}
}
]
};