-
Notifications
You must be signed in to change notification settings - Fork 2
/
keystone.js
60 lines (44 loc) · 1.41 KB
/
keystone.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
require('dotenv').load();
process.env.TZ = process.env.TZ || 'America/Montevideo';
process.env.TICKET_RESERVATION = process.env.TICKET_RESERVATION || 8;
var keystone = require('keystone');
require('./lib/patchs');
keystone.init({
'name': 'JSConfUY',
'brand': 'JSConfUY',
'sass': 'public',
'static': 'public',
'favicon': 'public/favicon.ico',
'views': 'templates/views',
'view engine': 'jade',
'emails': 'templates/emails',
'auto update': true,
'session': true,
'session store': 'mongo',
'auth': true,
'user model': 'User',
'cookie secret': '^v]|AGh(!xqsSq>OUl%<vSwxEh6WzFyN&v"Si0auh<xW1.6p_>lt>u8N"m.Q_Hzu'
});
keystone.import('models');
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
keystone.set('routes', require('./routes'));
if (keystone.get('env') !== 'production') {
keystone.set('sass options', { force: true });
}
keystone.set('cloudinary secure', true);
keystone.set('email locals', {
base_url: process.env.BASE_URL
});
keystone.set('nav', {
'conference': ['proposals', 'invitations', 'speakers', 'talks', 'workshops', 'members', 'attendees', 'sponsors', 'sponsor-levels'],
'schedule': ['days', 'tracks', 'slots'],
'sales': ['tickets', 'discounts', 'orders'],
'blog': ['posts', 'post-categories'],
'others': ['users', 'tags', 'channels', 'galleries']
});
keystone.start();