-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
36 lines (32 loc) · 1.16 KB
/
index.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
module.exports = function (extend = (config) => config) {
const App = {
config: extend(require('./config')()),
}
require('./server/withEntry')(App)
require('./server/withLogger')(App)
require('./server/withDb')(App)
require('./server/withI18n')(App)
require('./server/withExpress')(App)
require('./server/withCsrf')(App)
require('./server/withMoment')(App)
require('./server/withPeriodic')(App)
require('./server/withChallenges')(App)
require('./server/withStorage')(App)
require('./server/withChallengeStats')(App)
require('./server/dbModel')(App)
require('./server/expressHeaders')(App)
require('./server/expressSession')(App)
require('./server/expressPerfMonitor')(App)
require('./server/expressLanguage')(App)
require('./server/expressLoadUser')(App)
require('./server/expressRateLimit')(App)
require('./server/expressViews')(App)
require('./routes/staticPages')(App)
require('./routes/user')(App)
require('./routes/challenge')(App)
require('./routes/setConfig')(App)
App.entry.start().then(() => {
App.logger.info(App.moment().locale('en').format('LLLL'))
if (App.config.callback) App.config.callback(App)
})
}