Skip to content

Commit

Permalink
feat: replace .on with .connectWebSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Sep 10, 2024
1 parent 8cf3825 commit 68444db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ module.exports = function defineShipwrightHook(sails) {
const rsbuildDevServer = await rsbuild.createDevServer()
sails.after('hook:http:loaded', async () => {
sails.hooks.http.app.use(rsbuildDevServer.middlewares)
sails.hooks.http.server.on(
'upgrade',
rsbuildDevServer.onHTTPUpgrade
)
rsbuildDevServer.connectWebSocket({
server: sails.hooks.http.server
})
})
sails.on('lifted', async () => {
await rsbuildDevServer.afterListen()
Expand Down

0 comments on commit 68444db

Please sign in to comment.