-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
54 lines (50 loc) · 1.52 KB
/
app.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
'use strict';
// Initialize New Relic Node.js agent
if (process.env.NEW_RELIC_LICENSE_KEY) {
require('newrelic');
}
// Load the libraries and modules
var config = {
directory: __dirname + '/modules/',
modules: {
npm: [
[require('dragonnodejs-express'), {
app: {
port: process.env.PORT
},
auth: {
disabled: process.env.AUTH_DISABLED,
users: process.env.AUTH_USERS,
user: process.env.AUTH_USER,
password: process.env.AUTH_PASSWORD,
realm: process.env.AUTH_REALM
},
header: {
'X-UA-Compatible': 'IE=edge,chrome=1',
'X-Frame-Options': 'DENY',
'X-XSS-Protection': '1; mode=block',
'X-Powered-By': null
},
static: {
directory: __dirname + '/web/'
}
}],
[require('dragonnodejs-webserver'), {
bower: {
libraries: ['bootstrap', 'jquery', 'angular'],
path: __dirname + '/'
},
package: {
path: __dirname + '/package.json'
},
swig: {
views: __dirname + '/views/'
}
}]
],
directory: {
homepage: {}
}
}
};
require('dragonnodejs')(config);