background preloader

Node.js

Facebook Twitter

Sails.js | The future of API development. Grunt: a task-based command line build tool for JavaScript projects. Yeoman - Modern workflows for modern webapps. We open-sourced 90 node.js modules at Browserling! At Browserling we are huge open-source fans and we have open-sourced 90 node.js modules!

That's right! 90 node.js modules. All written from scratch. We crazy! Here is the complete list of all the modules together with their brief descriptions. We'd love if you followed us on GitHub. Also check out Browserling: And read how we raised $55,000 seed funding for Browserling. Here are all the modules we have written. 1. dnode DNode is an asynchronous object-oriented RPC system for node.js that lets you call remote functions. This starts dnode server on port 5050 and exports the zing function that asynchronously multiplies number n by 100.

And you have your client.js: var dnode = require('dnode'); dnode.connect(5050, function (remote) { remote.zing(66, function (n) { console.log('n = ' + n); });}); This connects to dnode server at port 5050, calls the zing method and passes it a callback function that then gets called from the server and the client outputs 6600. dnode on github 2. node-browserify Mr. Node.js. An example: Webserver This simple web server written in Node responds with "Hello World" for every request. To run the server, put the code into a file example.js and execute it with the node program from the command line: % node example.js Server running at Here is an example of a simple TCP server which listens on port 1337 and echoes whatever you send it: var net = require('net'); var server = net.createServer(function (socket) { socket.write('Echo server\r\n'); socket.pipe(socket);}); server.listen(1337, '127.0.0.1'); Featured Node.js at Walmart Eran Hammer, Principal Architect at Walmart, talks about how they use Node.js as a way to reinvent legacy APIs to create modern front end experiences.