-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.js
43 lines (35 loc) · 1015 Bytes
/
web.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
/* @flow */
require('dotenv').config();
const keystone = require('keystone');
var handlebars = require('express-handlebars');
keystone.init({
'name': 'nvision 2017',
'brand': 'nvision 2017',
'favicon': 'public/favicon.ico',
'less': 'public',
'static': ['public'],
'auto update': true,
'mongo': 'mongodb://localhost/nvision2017',
'session': true,
'session store': 'mongo',
'auth': true,
'signin url': '/signin',
'signin redirect': '/dashboard',
'signout redirect': '/signin',
'user model': 'User',
'cookie secret': 'This is a Huuge Secret',
'views': 'templates/views',
'custom engine': handlebars.create({
// layoutsDir: 'templates/views/layouts',
partialsDir: 'templates/views/partials',
// defaultLayout: 'default',
// helpers: new require('./templates/views/helpers')(),
extname: '.html',
}).engine,
'view engine': 'html',
'port': 3001
});
require('./models');
keystone.set('routes', require('./routes'));
keystone.set('updatesWeb', '');
keystone.start();