
Understanding node.js Node.js has generally caused two reactions in people I've introduced it to. Basically people either "got it" right away, or they ended up being very confused. If you have been in the second group so far, here is my attempt to explain node: It is a command line tool. "But I can do everything I need in: ruby, python, php, java, ... !". I hear you. "Get to the point!" Alright, I will. "Huh?" That's right, everything runs in parallel, except your code. The day starts by one servant waking up the king and asking him if he needs anything. Once a servant finishes a task, he lines up outside the kings quarter to report. Life is good, for the king's servants carry out all of his tasks in parallel, but only report with one result at a time, so the king can focus "That's fantastic, but could you quit the silly metaphor and speak geek to me?" Sure. var fs = require('fs') , sys = require('sys'); fs.writeFile('letter-to-princess.txt', '...', function() { sys.puts("can't wait to hear back from her!") No. --fg
Useful Node.js Tools, Tutorials And Resources Advertisement Created by Ryan Dahl in 2009, Node.js is a relatively new technology which has gained a lot of popularity among Web developers recently. However, not everyone knows what it really is. And that’s not all: what’s really great about Node.js is the thousands of modules available for any purpose, as well as the vibrant community behind this young project. Useful Node.js Tools Node Express Boilerplate Node Express Boilerplate gives the developer a clean slate, while bundling enough useful features to remove all of those redundant tasks that can derail a project before it even gets started. Socket.IO Socket.IO is a cross-browser Web socket that aims to make real-time apps possible in every browser and mobile device, blurring the distinctions between the various transport mechanisms. Mastering Node With Mastering Node, you can write high-concurrency Web servers, using the CommonJS module system, Node.js’s core libraries, third-party modules, high-level Web development and more. (al)
How to write your own native Node.js extension - Olivier Lalonde's blog UPDATE: There is now a Node.js addon for loading and calling dynamic libraries using pure JavaScript: node-ffi. Also, node-waf is no longer being used to compile Node.js extensions. TRANSLATIONS: This post was translated to Chinese: Introduction This is a follow up to How to roll out your own Javascript API with V8. We will now port the code we have written for V8 to Node.js and package it for npm. The full source code of this tutorial is available from github: git clone You can also install it through npm: npm install notify The code was tested on Ubuntu 10.10 64-bit and Node.js v0.5.0-pre. Getting started First let’s create a node-notify folder and with the following directory structure. This fine looking tree was generated with the tree utility. Now let’s create our test script demo.js and decide upfront what our extension’s API should look like: Writing our Node.js extension
Node.js on Android I mainly use node.js since one year ago at work, and I really like it. On my work project, I have to create a system which uses socket.io, but I don't have enough time to re-create a system using Android Java. But I finally figure out how to run node.js on Android. * This is really advanced topic, so I don't aim for Android beginners. Just for my memo. 1. First of all, you have to obtain root permission of your Android. 2. Debian kit for Android is really awesome tool. Debian kit for An Instr $> cd /data/local/tmp $> wget $> sh debian-* ... ... 3. Before install node.js, you also need couple of debain packages. #> apt-get install openssl build-essential python libssl-dev git-core To install node.js for Debian, you might need to compile node.js from source code. If your Android uses ARM architecture, you might be get couple of errors. #> .
Cross-compile node.js on ARM - the WigWag devblog. 3/5/13 –> We don’t have time to post updates right now, but if you need a working script for node 0.8 using an ARM toolchain, see example Gist here Note: the information was current as of node 0.7.0 top of tree, from circa Jan 21, 2012. So modify as necessary. There are three major steps/challenges in getting node.js to compile on ARM We need to get V8 to compile on your target arch. We are going to assume that you have successfully got V8 compiling for your hardware. Understanding the node.js build process. As of 0.6.x, node.js uses gyp (Generate Your Projects) from the Chromium project. node is configured using a python script, configure, in the root of the source. configure has an option for cross compile, –dest-cpu=ARCH where it says arm, ia32 and x64 are valid architectures. Full cross compile support does not really seem to be baked into node.js yet. setup-cross.sh For this script to work, I ended up needing to make some minor changes to node 0.7.0. So we need armv7 to ! and
Node.js partie 1 - Tout ce que vous devez savoir sur Node.js - Web Tambouille 3.0 Parmi les nombreuses technologies qui me passionnent actuellement, Node.js tient une place importante. Et pour plusieurs raisons : développement Javascript côté serveur, gestion des entrées/sorties de manières non bloquantes, communauté très présente avec de nombreux modules comme Socket.IO et bien d’autres choses encore. C’est pour toutes ces raisons, et aussi parce que la nouvelle version 0.4.0 vient de sortir, que Web Tambouille vous propose une série de 4 billets consacrée exclusivement à votre futur serveur préféré : Node ! Et cela commence dès aujourd’hui avec une petite introduction générale du serveur, ses concepts, les interviews et autres vidéos à ne pas manquer, les liens à connaître… bref un condensé de tout ce que vous devez absolument savoir sur Node ! Présentation Node s’appuie sur V8, le moteur Javascript de Google utilisé dans Chrome, qui fait partie des moteurs Javascript les plus puissants du marché actuellement. Prenons l’exemple du serveur Apache. Juste pour pinailler