Answer the question
In order to leave comments, you need to log in
What's wrong with socket.io?
const express = require('express')
const app = express()
const io = require('socket.io')(3000)
app.get('/', (request, response) => {
response.sendFile(__dirname + '/index.html')
})
io.on('connection', socket => {
console.log('A user connected!')
socket.on('disconnect', () => {
console.log('A user disconnected!')
})
})
app.listen(3000, () => {
console.log('Сервер запущен на порте: 3000')
})
// Error: listen EADDRINUSE: address already in use :::3000
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question