chat-with-gpt/app/src/setupProxy.js

14 lines
378 B
JavaScript
Raw Normal View History

2023-03-14 11:00:40 +00:00
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
'/chatapi',
createProxyMiddleware({
target: 'http://localhost:3001',
secure: false,
changeOrigin: true,
})
);
};