Есть сервер подключение идет по ws , просят сделать по wss , как можно реализовать помогите новичау
const ws = require('ws')
const PORT = {
CONTROLLER: 3301,
DISPLAY: 3302
}
const controllerWsServer = new ws.Server({port: PORT['CONTROLLER']})
const displayWsServer = new ws.Server({port: PORT['DISPLAY']})
let controllerWsConnection, displayWsConnection
controllerWsServer.on('connection', connection => {
controllerWsConnection = connection
controllerWsConnection.on('message', message => {
if (displayWsConnection)
displayWsConnection.send(message)
})
})
displayWsServer.on('connection', connection => {
displayWsConnection = connection
})