"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var express = require("express");
var path = require("path");
// Teach express to properly handle async errors
require('express-async-errors');
var logging_1 = require("./middleware/logging");
exports.createServer = function (args) {
    var app = express();
    app.use(logging_1.logRequest({ logger: args.logger }));
    app.use('/probot/static/', express.static(path.join(__dirname, '..', 'static')));
    app.use(args.webhook);
    app.set('view engine', 'hbs');
    app.set('views', path.join(__dirname, '..', 'views'));
    app.get('/ping', function (req, res) { return res.end('PONG'); });
    return app;
};
//# sourceMappingURL=server.js.map