background preloader

Node.js

Facebook Twitter

The Node Beginner Book » A comprehensive Node.js tutorial. Node: Up and Running. Table of Contents - Mixu's Node book - Mixu's Node book. Mastering Node. Node is an exciting new platform developed by Ryan Dahl, allowing JavaScript developers to create extremely high performance servers by leveraging Google's V8 JavaScript engine, and asynchronous I/O.

In Mastering Node we will discover how to write high concurrency web servers, utilizing the CommonJS module system, node's core libraries, third party modules, high level web development and more. In this chapter we will be looking at the installation and compilation of node. Although there are several ways we may install node, we will be looking at homebrew, nDistro, and the most flexible method, of course - compiling from source. Homebrew Homebrew is a package management system for OSX written in Ruby, is extremely well adopted, and easy to use. To install node via the brew executable simply run: $ brew install node.js nDistro nDistro is a distribution toolkit for node, which allows creation and installation of node distros within seconds.

. $ ndistro Building From Source $ . Creating Modules module. Read JavaScript and Node FUNdamentals | Leanpub. If it’s not fun, it’s not JavaScript. 1 JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 1.1 Expressiveness Programming languages like BASIC, Python, C has boring machine-like nature which requires developers to write extra code that’s not directly related to the solution itself.

Think about line numbers in BASIC or interfaces, classes and patterns in Java. On the other hand JavaScript inherits the best traits of pure mathematics, LISP, C# which lead to a great deal of expressiveness (and fun!). More about Expressive Power in this post: What does “expressive” mean when referring to programming languages? The quintessential Hello World example in Java (remember, Java is to JavaScript is what ham to a hamster): 1 public class HelloWorld {2 public static void main(String[] args) {3 System.out.println("Hello World");4 }5 } The same example in JavaScript: 1 console.log('Hello World') or from within an HTML page: 1 <script>2 document.write('Hello World')3 </script> but or.