forked from keystonejs/keystone-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keystone.js
55 lines (41 loc) · 1.32 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
var keystone = require('keystone');
keystone.init({
'name': 'Keystone Demo',
'brand': 'Demo',
'favicon': 'public/favicon.ico',
'less': 'public',
'static': 'public',
'views': 'templates/views',
'view engine': 'jade',
'auto update': true,
'mongo': process.env.MONGO_URI || process.env.MONGOLAB_URI || 'mongodb://localhost/keystone-demo',
'cloudinary config': 'cloudinary://333779167276662:_8jbSi9FB3sWYrfimcl8VKh34rI@keystone-demo',
'session': true,
'auth': true,
'user model': 'User',
'cookie secret': process.env.COOKIE_SECRET || 'demo',
'ga property': process.env.GA_PROPERTY,
'ga domain': process.env.GA_DOMAIN,
'chartbeat property': process.env.CHARTBEAT_PROPERTY,
'chartbeat domain': process.env.CHARTBEAT_DOMAIN
});
keystone.import('models');
keystone.set('locals', {
_: require('lodash'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
ga_property: keystone.get('ga property'),
ga_domain: keystone.get('ga domain'),
chartbeat_property: keystone.get('chartbeat property'),
chartbeat_domain: keystone.get('chartbeat domain')
});
keystone.set('routes', require('./routes'));
keystone.set('nav', {
'posts': ['posts', 'post-comments', 'post-categories'],
'galleries': 'galleries',
'enquiries': 'enquiries',
'users': 'users',
'field-tests': 'things'
});
keystone.start();