I am using node.JS in VirtualBox on TurnkeyLinux hosted by Windows. I followed the instructions here . node.JS lives in / root / node. Although I can run simple examples successfully, it’s hard for me to identify some things because I am not an ordinary Linux guy. I wanted to use socket.io.
I managed to install node.JS myself using git and tried this with Express and Socket.IO. (e.g. git clone git: //github.com/LearnBoost/Socket.IO.git). It seems to work, but I can't find anything anywhere! Was in / root / node when calling git, waiting for changes in the lib folder ...
node.JS uses the CommonJS module system. In the example, Socket.IO is io = require('../')used to import Socket.IO, which looks rather strange to me. Other examples on the Internet relate to "./Socket.IO- node". Since the module is only a JS file after certain rules, I would expect sth as the path to such a file, since I found http.js in / root / node / lib. By the way, looking at the server.js example: Is there a specific reason using var for http, but not for the rest of the variables (url, fs, io, sys)?
On the client side of the first line to "How to use" Socket.IO: io.setPath(...). setPath is not mentioned anywhere on the page. Where should he indicate that?
I did not find information about stopping / restarting the node using the shell. Perhaps it is so obvious that he was never mentioned anywhere;)
Thanks for the help.
source
share