UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

19 lines (16 loc) 428 B
"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 })); }