Runs socket io on https server


#1

I’ve tried add socket.js like Virk said,

const Server = use('Server')
const io = use('socket.io')(Server.getInstance())

io.on('connection', function (socket) {
  console.log(socket.id)
})

and use https server in server.js

new Ignitor(require('@adonisjs/fold'))
    .appRoot(__dirname)
    .fireHttpServer(handler => https.createServer(options, handler))
    .catch(console.error);

but when I run the server always had an error like this