mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-26 14:29:36 +02:00
15 lines
348 B
JavaScript
15 lines
348 B
JavaScript
|
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||
|
|
||
|
module.exports = function (app) {
|
||
|
const apiProxy = createProxyMiddleware('/api', {
|
||
|
target: 'http://localhost:5005'
|
||
|
})
|
||
|
|
||
|
const wsProxy = createProxyMiddleware('/socket', {
|
||
|
target: 'http://localhost:5005',
|
||
|
ws: true
|
||
|
})
|
||
|
|
||
|
app.use(apiProxy);
|
||
|
app.use(wsProxy);
|
||
|
};
|