December 2017
Intermediate to advanced
260 pages
7h 34m
English
With the Socket.IO library, you should open a port and listen to the request using the following lines of code. Initially, we were directly using app.listen(), but now, we will pass that function as a listener for sockets:
val io = require("socket.io").listen(app.listen(port, { println("Chat app listening on port http://localhost:$port") }))
The server will listen to the following events and based on those events, it will perform certain tasks:
Read now
Unlock full access