Hello, I’m trying to learn more about Socket.io in Node.js. In their documentation they are recommending you to create web appliaction instance using express:
const app = require("express")();
And then create HTTP server like this:
var http = require('http').createServer(app);
As I understand - the http module is a built in node.js module that lets us create http server. But why can’t we use in this example simple app.listen(PORT)
?