What is node.js?
NOTE: node.js outperforms Python and Ruby, thanks to the V8 engine.
Install (from github repository)
Prerequisites (Unix only):
- Python 2.6 or 2.7
- GNU Make 3.81 or newer
- libexecinfo (FreeBSD and OpenBSD only)
Simple node.js web server
This simple web server written in Node responds with "Hello World" for every request.
Create server.js with the following code
To run the server, put the code into a file example.js and execute it with the node program
echo server in node.js
Simple TCP server which listens on port 1337 and echoes whatever you send it.
Example use case (shadowsocks-nodejs)
Pull all files on to both server and client
Run the proxy on the server
Change browser, chat client proxy to localhost and the port specified in config.json.
NOTE: this is similar to SSH Tunnel but the advantage is that you don't have to reestablish the connection after switching WiFi or wired networks.
GitHub Project https://github.com/joyent/node
Node Version Manager (NVM) https://github.com/creationix/nvm