"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.serveContextFiles = serveContextFiles;

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

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

function serveContextFiles(app, options) {
  const {
    context,
    contextURL,
    contextFolderPath
  } = options;
  app.use(`${contextURL}/fonts`, _express.default.static(`${context}/fonts`));

  if (contextURL) {
    app.use(contextURL, _express.default.static(contextFolderPath));
  } else {
    app.use(_express.default.static(context));
  }
}