UNPKG

maurya-scripts

Version:

maurya-scripts compiles elements, menu etc and distributes it with the maurya-editor

15 lines 572 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.apiRouter = void 0; const http_proxy_middleware_1 = require("http-proxy-middleware"); const apiRouter = (router, context, mauryaServerPort) => { router.use("/api/*", (0, http_proxy_middleware_1.createProxyMiddleware)({ target: `http://localhost:${mauryaServerPort}`, changeOrigin: true, pathRewrite: function (path, req) { return path.replace("/api", ""); }, })); }; exports.apiRouter = apiRouter; //# sourceMappingURL=apiRouter.js.map