somewhere
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
const wss = require('../server/WebSocket/wss')
|
||||
const { isProduction } = require('../server/_env')
|
||||
|
||||
export default function () {
|
||||
this.nuxt.hook('listen', (server, { host, port }) => {
|
||||
// attach WebSocket Server to Nuxt Server in production mode
|
||||
if (isProduction) wss(server)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user