not working: attempt to stream in websocket

added Vite proxy, tested with websocat, with direct js websocket.
the error seems to be Laminex related
This commit is contained in:
efim
2023-04-23 21:18:24 +04:00
parent 329dc6e8b2
commit 5ac864f15e
5 changed files with 91 additions and 17 deletions

View File

@@ -3,4 +3,16 @@ import scalaJSPlugin from "@scala-js/vite-plugin-scalajs";
export default defineConfig({
plugins: [scalaJSPlugin()],
server: {
proxy: {
// Proxy all requests starting with /api to your backend server
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
ws: true, // Enable WebSocket proxying
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
});