Socket.io in Eventlistener

I am trying to send a message whenever user clicks the button with socket.io. Here is my server-side code: const app = express() const http = require(‘http’) const server = http.createServer(app) var …