"use strict";

var _path = _interopRequireDefault(require("path"));

var _express = _interopRequireDefault(require("express"));

var _utils = require("../utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

let options = (0, _utils.getOptions)();
let {
  help: {
    server
  }
} = options;
let serverUrl = (0, _utils.getServerURL)(server, 'htt' + 'p');
let {
  port
} = server;
let app = (0, _express.default)();
app.use('/help', _express.default.static(_path.default.join(__dirname, '..', '..', 'templates', 'help')));
app.listen(port, err => {
  if (err) {
    throw err;
  }

  (0, _utils.log)(`Listening at ${serverUrl}/help/`);
});