const PORT = process.env.PORT || 5000
const app = express()
const server = http.createServer(app)
server.on('upgrade', (req, socket) => {
// здесь websocket, можно использовать пакет ws
})
server.listen(PORT, () => console.log(`Server started on PORT = ${PORT}`))