Skip to content

Commit 246311b

Browse files
authored
fixed autoreload (#3071)
1 parent ffbae22 commit 246311b

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

frontend/src/setupProxy.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
const { createProxyMiddleware } = require('http-proxy-middleware');
2-
3-
module.exports = function(app) {
4-
app.use(
5-
createProxyMiddleware('/ws', {
6-
target: 'ws://localhost/',
7-
ws: true,
8-
})
9-
);
10-
app.use(
11-
createProxyMiddleware('/',{
12-
target: 'http://localhost',
13-
})
14-
);
1+
// eslint-disable-next-line import/no-extraneous-dependencies
2+
const { createProxyMiddleware } = require("http-proxy-middleware");
153

4+
module.exports = function (app) {
5+
app.use(
6+
createProxyMiddleware("/ws", {
7+
target: "ws://localhost/",
8+
// eslint-disable-next-line id-length
9+
ws: true,
10+
}),
11+
);
12+
app.use(
13+
createProxyMiddleware("/api", {
14+
target: "http://localhost",
15+
}),
16+
);
1617
};

0 commit comments

Comments
 (0)