background preloader

NodeJS

Facebook Twitter

BrowserQuest/server at master · mozilla/BrowserQuest. Introduction to npm. Static Version This was the third in a series of posts leading up to Node.js Knockout on how to use node.js. npm is a NodeJS package manager.

Introduction to npm

As its name would imply, you can use it to install node programs. Also, if you use it in development, it makes it easier to specify and link dependencies. Installing npm First of all, install NodeJS. To install npm in one command, you can do this: curl | sh Of course, if you're more paranoid than lazy, you can also get the latest code, check it all out, and when you're happy there's nothing in there to pwn your machine, issue a make install or make dev. what, no sudo?

I strongly encourage you not to do package management with sudo! I recommend doing this once instead: sudo chown -R $USER /usr/local That sets your user account as the owner of the /usr/local directory, so that you can just issue normal commands in there.

Scripts

Create Wiki — V8 Cookbook. From Create Wiki The Create Framework's Script Engine is built on top of Google's v8 JavaScript engine.

Create Wiki — V8 Cookbook

Google's v8 is pretty nice, but its documentation is rather spotty. Tutorial. Algorithm. Frameworks. Screencasts. Mastering Node - Open Source Nodejs eBook. Node.js Knockout. Mongoose « Gradebook. Add Update: Mongoose 1.0 has been released, and we recommend going to our dedicated website for the most up-to-date information and code At LearnBoost, we like to consider ourselves hackers. We look to implement the best technical solutions for our needs then tell people how we did it and hope they fork our code, contribute and make it even better.

To make a kick-ass solution for schools , we needed a data store that was scalable, fast and able to keep up with constant iterations of features. In this blog post, you will read about our thought process when choosing Mongo DB and also more about our technical infrastructure . Getting Started with MongoDB and Node.js. Introduction to Node.js: perspectives from a Drupal dev. Node.js: uses and ideas? Pixel Ping: A node.js Stats Tracker. Since the day we launched, ProPublica has encouraged people to republish our stories for free.

Pixel Ping: A node.js Stats Tracker

We even license our stories under Creative Commons (CC). However, in the past we've had trouble knowing precisely which stories had been republished where, and we had no way of knowing how many people were reading our stories on sites that republished them under our CC license. Shortly after the redesign of our site, we started working on a system that would help us solve this problem. When we found out that Jeremy Ashkenas, a developer at DocumentCloud, was working on a similar problem, we joined forces, and finished work on a lightweight stats tracker, which we are open sourcing today.

World, meet Pixel Ping. I pushed 20 more of my projects to GitHub. Remember my previous article "I pushed 30 of my projects to GitHub?

I pushed 20 more of my projects to GitHub

" Well, I just gathered 20 more projects that I had done (or did recently) and pushed them all to GitHub. Quick note on GitHub - GitHub is the best invention ever for programmers. Nothing stimulates you more than pushing more and more projects to GitHub and seeing people forking them, following them, finding and fixing bugs for you.

How To Node - NodeJS. Parsing file uploads at 500 mb/s with node.js » Debuggable Ltd. A few weeks ago I set out to create a new multipart/form-data parser for node.js.

Parsing file uploads at 500 mb/s with node.js » Debuggable Ltd

We need this parser for the new version of transloadit that we have been working on since our setback last month. The result is a new library called formidable, which, on a high level, makes receiving file uploads with node.js as easy as: var formidable = require('formidable') , http = require('http') , sys = require('sys'); Essentially this works similar to other platforms where file uploads are saved to disk before your script is invoked with a path to the uploaded file. What's nice about this however, is that you can hook into the whole thing on a lower level: We use that interface for processing HTML5 multi-file uploads as they come in, rather than waiting for the entire upload to finish.

You could even overwrite the onPart handler, which gives you direct access to the raw data stream: All of this is possible thanks to the underlaying multipart parser which makes heavy use of node.js buffers. --fg. Nodejitsu/node-http-proxy - GitHub. Node.js is genuinely exciting. I gave a talk on Friday at Full Frontal , a new one day JavaScript conference in my home town of Brighton. I ended up throwing away my intended topic (JSONP, APIs and cross-domain security) three days before the event in favour of a technology which first crossed my radar less than two weeks ago .

That technology is Ryan Dahl’s Node . It’s the most exciting new project I’ve come across in quite a while. At first glance, Node looks like yet another take on the idea of server-side JavaScript, but it’s a lot more interesting than that. It builds on JavaScript’s excellent support for event-based programming and uses it to create something that truly plays to the strengths of the language. Node describes itself as “evented I/O for V8 javascript”. Evented I/O? As I discussed in my talk, event driven servers are a powerful alternative to the threading / blocking mechanism used by most popular server-side programming frameworks.