
Mongo Model Domain Model for MongoDB and Node.JS CoffeeScript and Fibers are optional. You can use Model with plain old JavaScript and Callbacks. class global.Post extends Model @collection 'posts' @embedded 'comments' class global.Comment extends Model Dynamic schema, flexible queries. post = new Post text: 'Zerg on Tarsonis!' Mongoose First be sure you have MongoDB and Node.js installed. Next install Mongoose from the command line using npm: $ npm install mongoose Asynchronous Control Flow with Promises Static Version A Promise is an object that represents the result of an asynchronous function call. Promises are also called futures and deferreds in some communities. Goal of this Article Goodbye Effect Games Friends, The time has come to shut the doors on Effect Games, so we can move onto other projects. But we've preserved some of our old games and demos for you to play with: We've also open sourced the entire Effect Games engine, as well as the web IDE. Effect Games, in it's entirety, has been moved to GitHub. It can be forked, or simply downloaded and installed on your own server.
Kue Kue is a feature rich priority job queue for node.js backed by redis. A key feature of Kue is its clean user-interface for viewing and managing queued, active, failed, and completed jobs. At any point in the job's life-time you can view verbose details, including the job's arbitrary data, creation, update, failure, and completion times.
Managing module dependencies Static Version Following this discussion on the node.js mailing list about managing module dependencies, I thought it's worth sharing some pointers on that here. Using NPM to bundle your module dependencies If you're building an application that is dependent on a number of NPM modules, you can specify them in your package.json file this way: By doing so, every time you checkout your project fresh, all you need to do to get your dependencies sorted out is: $ npm install AT&T Developer Program A few months ago at work, we decided to build a realtime multiplayer game for the web, and we chose to go with Node.js for our multiplayer server. It was a pretty strong success, and was up running for several months without a single crash or restart of the Node.js process. We decided to write our game in Node.js because we had heard of this cool platform and had been itching to use it for a while. This turned out to be a blessing because it was very easy to get into, and many interesting Node.js libraries exist to help accomplish various task. A side benefit of using node is that javascript itself is very easy to use.
How To Module Static Version This article was written for Node v0.4.1 and is no longer applicable. As of node.js 0.6.3 NPM comes pre-installed. These are some basic steps for writing a NodeJS module. Most of the suggestions in this document are optional. Developing Multiplayer HTML5 Games with Node.js One day I had some friends over at my house introducing me some cool iPad games. One of the games was Osmos, developed by an Canadian indie studio called Hemisphere Games. You control a little blob that floats in 2D space, and the only thing your blob can do is shoot pieces of itself in a given direction, which propels it in the opposite direction.
GivenWhenThen: Simple, Powerful Acceptance Testing for Node.js Over the last year or so, interest in and development for Node.js has accelerated dramatically. There is no shortage of excitement and promise in this burgeoning community and for many of the same reasons cited by others, about six months ago we decided it made sense to dive in ourselves. Coming from a committed testing background on multiple web frameworks, including Rails, we are strong adherents to BDD. Naturally the first thing we did when spinning up on the Node stack was look around for good BDD acceptance testing tools. Not finding anything that fit for us, we went ahead and rolled our own. In this post, we’ll introduce GivenWhenThen, a DSL and runner that allows anyone to easily construct acceptance tests with BDD semantics in straightforward, sentence-like statements and then run them against Sauce Labs.