The server part is working, I am trying to activate the client, there are no errors, but console.log('Client connect') does not show up. Help solve, and explain why. index.html file

 <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>wellcome</h1> <script src= "socket.io/socket.io.js"></script> <script> const socket = io() socket.on('connection', () => { console.log('Client connect') }) </script> <textarea name="name" rows="8" cols="40"></textarea> <p></p> <input type="text" name="text" size="20"> <button type="button" name="button">Отправить</button> </body> </html> 

server.js file

 const express = require('express') const socketIO = require('socket.io') const path = require('path') const http = require('http') const clientPath = path.join(__dirname, '../client') const port = process.env.PORT || 3000 const app = express() const server = http.createServer(app) const io = socketIO(server) io.on('connection', () => { console.log('IO Connection') }) app.use(express.static(clientPath)) server.listen(port, () => { console.log('Server has been started on port ' + port) }) 

0