Closed The-Law-1 closed 2 years ago
Done, bug with proxy middleware forces this code: // * if this works, thanks to this: https://github.com/chimurai/http-proxy-middleware/discussions/582 const wsProxy = createProxyMiddleware("/cryptosocket", { target:http://${serverHost}:${webSocketPort}`, ws: true })
// * if this works, thanks to this: https://github.com/chimurai/http-proxy-middleware/discussions/582 const wsProxy = createProxyMiddleware("/cryptosocket", { target:
module.exports = function(app) { app.use( '/api', createProxyMiddleware({ target: http://${serverHost}:${serverPort}, //changeOrigin: true, }) ); app.use(wsProxy); // app.use( // '/cryptosocket', // createProxyMiddleware({ // target: http://${serverHost}:${webSocketPort}, // ws: true, // // changeOrigin: true, // }) // ); };`
http://${serverHost}:${serverPort}
http://${serverHost}:${webSocketPort}
Done, bug with proxy middleware forces this code:
// * if this works, thanks to this: https://github.com/chimurai/http-proxy-middleware/discussions/582 const wsProxy = createProxyMiddleware("/cryptosocket", { target:
http://${serverHost}:${webSocketPort}`, ws: true })module.exports = function(app) { app.use( '/api', createProxyMiddleware({ target:
http://${serverHost}:${serverPort}
, //changeOrigin: true, }) ); app.use(wsProxy); // app.use( // '/cryptosocket', // createProxyMiddleware({ // target:http://${serverHost}:${webSocketPort}
, // ws: true, // // changeOrigin: true, // }) // ); };`