forked from lmarkus/ReviewBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (24 loc) · 767 Bytes
/
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
'use strict';
const express = require('express')
, kraken = require('kraken-js')
, github = require('./lib/github')
, debuglog = require('util').debuglog('reviewBot')
;
let options, app;
/*
* Create and configure application. Also exports application instance for use by tests.
* See https://github.com/krakenjs/kraken-js#options for additional configuration options.
*/
options = {
onconfig: function (config, next) {
github.init(config.get('app') || {}, function () {
next(null, config);
});
}
};
app = module.exports = express();
app.use(kraken(options));
app.on('start', function () {
debuglog('Application ready to serve requests.');
debuglog('Environment: %s', app.kraken.get('env:env'));
});