"use strict";

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

var _httpProxyMiddleware = require("http-proxy-middleware");

function mockApiSupport(app, server) {
  const {
    mockPrefix,
    mockPort
  } = server;
  app.use(mockPrefix, (0, _httpProxyMiddleware.createProxyMiddleware)({
    target: 'ht' + `tp://localhost:${mockPort}`,
    changeOrigin: true
  }));
}