On Startup error: io.listen is not a function
web-terminal --port 8088 Web-Terminal running at http://localhost:8088/terminal /usr/local/lib/node_modules/web-terminal/lib/terminal.js:155 io = io.listen(server, { log: false }); ^
TypeError: io.listen is not a function
at initialize (/usr/local/lib/node_modules/web-terminal/lib/terminal.js:155:13)
at Object.
Following
Solved it by adding:
let protocol = "http"; http = require(protocol); let server = http.createServer();
in the begining of the terminal.js file
io = io.listen(server, { log: false }); => io = io(server, { log: false });
io = io.listen(server, { log: false }); => io = io(server, { log: false });
please can you explain why this works