background preloader

How To Node - NodeJS

How To Node - NodeJS
By Tim Caswell Generators vs Fibers Both ES6 generators and node-fibers can be used to block a coroutine while waiting on some I/O without blocking the entire process. This means that you can wait for an I/O result within your code but still have the performance benefits of the single-threaded, non-blocking I/O model you all know and love. Both can do this for arbitrarily deep call stacks. The main difference between the capabilities of the two is how explicit the syntax is.

Modules - GitHub This page is deprecated. Feel free to add to it, but be advised that it is, at best, a faded relic of Node modules that were written before npm was a dominant force in the Node.js ecosystem. It is not all that useful any more. If you are a newcomer, it can be handy to at least get a starting point. However, note that there are many tens of thousands of modules in the npm registry, and only just under 2,000 modules here. So, this list is long enough to be intimidating, but still only captures a tiny sliver of the Node.js modules you can use with your program. Is NodeJS Wrong ? - Nicolas Cannasse Blog NodeJS is pretty popular these days, so I took some time to have a in-depth look at it and analyze the pro/cons of using it against another server-side technology. The first issue I can see is not technical : you have to rewrite all your programs and libraries by passing callback methods. This is a bit annoying since if you want to make three async requests you have to write the following :

Felix's Node.js Beginners Guide « Home / All Guides There is lots of information about node.js, but given the rapid pace at which it is developing, it can be difficult for beginners to find good, current information on how to get started. This guide aims to provide exactly that, whilst staying updated with the latest stable version of node.js. This guide has been updated to reflect the latest changes in node 0.4.x, the currently stable branch of node.js. Learning JavaScript

Migrating from 2.x to 3.x · visionmedia/express Wiki Removed Changed req.header(field[, defaultValue]) replaced by req.get(field) (remains for backwards compatibility)res.header(field[, value]) replaced by res.set(field, value) / res.get(field) (remains for backwards compatibility)renamed app.register() to app.engine()template engine compliance from engine.compile(str, options) => Function to engine.

Pixel Ping Pixel Ping is a minimalist pixel-tracker written in CoffeeScript for Node.js. If you provide embeddable applications or HTML widgets for third-party sites, are serving them statically, would like to keep track of specific usage information, and don't want to inject something heavy like Google Analytics, perhaps Pixel Ping can help. The complete annotated source code is also available.

Deploying node.js apps by Ben Gourley Here at Clock, long gone are the days of FTP uploads to put a site live. We use deployment tools to automate the process, which have the advantage of being faster, while reducing the chance of human error. I'm delving into node.js development, for which I've set up my own deployment and hosting. Here's my situation: I use my local machine for developmentI have a remote server with SSH access for testing and productionI'm using git for source controlnode and npm are installed locally and remotely And here are my objectives:

An Absolute Beginner's Guide to Node.js There's no shortage of Node.js tutorials out there, but most of them cover specific use cases or topics that only apply when you've already got Node up and running. I see comments every once and awhile that sound something like, "I've downloaded Node, now what?" This tutorial answers that question and explains how to get started from the very beginning. What is Node.js?

Node Demo What is this thing? An online quiz system with realtime sync between the quiz server and connected clients (desktops, laptops, tablets, smartphones…) and an optional hardware interface. This is a wide-angle demo of Node.js capabilities, well-known modules, best practices, code patterns, etc. It was intended as the support of my Node.js talks at various conferences including BLEND, France.JS and tech·days. I also use it during my training classes for quiz running, because eh, it just works! Annotated source Export This: Interface Design Patterns for Node.js Modules When you require a module in Node, what are you getting back? When you write a module, what options do you have for designing its interface? When I was first learning to work in Node I found the sheer number of ways to do things to be a bit overwhelming. JavaScript is extremely flexible and the community of developers contributing to open source seem to have different styles for implementing the same thing. On my journey with Node I've been keeping an eye out the Good Way to do things and adopting them for use in my own work and in our work at Good Eggs. In this post I'll share my observations of the Node module system and the ways in which you can use it to encapsulate and share code.

Developer's Guide (v1): Getting Started - Page Speed Online API - Google Code This document explains how to get started using the PageSpeed Insights API. Contents Introduction This document is intended for developers who want to write applications that can interact with the PageSpeed Insights API. PageSpeed Insights is a tool that helps developers optimize their web pages by analyzing the pages and generating tailored suggestions to make the pages faster. You can use the PageSpeed Insights API to programmatically generate PageSpeed scores and suggestions. How to create a private npm.js repository by Tom Gallacher Or so I thought. I was going to do some development on my local machine, so I fired up npm install <packagename>. Unfortunately, due to a outage, it was not possible for me to get on with my work. So I did what any driven developer would do; I set up a CouchDB replica of

NoFlo: two years of flow-based programming - Henri Bergius in Berlin, Germany NoFlo — the flow-based programming system I started — is now two years old. I pushed the first commits to GitHub on June 5th 2011 from Hacker Dojo in Mountain View. To get us started with the story, I’ll let Wikipedia summarize: Flow-based programming (FBP) is a programming paradigm that defines applications as networks of “black box” processes, which exchange data across predefined connections by message passing, where the connections are specified externally to the processes. These black box processes can be reconnected endlessly to form different applications without having to be changed internally. While flow-based programming is still far from mainstream, it has been great to watch to the community grow around NoFlo.

Hosting Node.js and MongoDB After digging into web development with Node.js the last couple of months I had to choose where to host this blog, which I had decided to rewrite and run with Node as a result of my research. To be honest, I’ve been surprised there is no real ecosystem of (shared) hosting providers offering Node.js and MongoDB (which often is the obvious choice when developing a node application) on the cheap. There are some providers like nodejitsu for Node.js and mongolab for MongoDB - but there is no fully integrated experience as you would expect it coming from the LAMP world or even ASP.NET. So it seemed to be a Do-it-yourself-world. Challenge accepted! :-)

Create a Web App with Node.js - Boldr Create a Web App with Node.js Node.js is the new hype for server-side webish things. It's evented, non-blocking, fast and in javascript (not another language to learn, yay!). Real-Time Web is around the corner. Javascript means you can use existing JS librairies.

Related:  Node