background preloader

Node.js

Facebook Twitter

Incidentally…: Building with Node.js: Groundwork. The other day, I discussed my intentions to start working with Node.js, and to document my experiences as I cobble together various pieces to satisfy a few typical technical requirements. As with that introductory article, this installment will remain brief and cover the basic tools, how to install them, and how to quickly create a skeleton Express application. Every beginner will initially use two utilities: node (the Node.js runtime), and npm (the Node Package Manager). The first is what you'll use to start your application, and the latter is used to download from public repositories and install any libraries your application depends on (in that regard, it's analogous to Maven, Ivy, and SBT). Both are included in Node.js distributions available for download from their web site, but—as always—I strongly encourage that you install all software from packages rather than dumping binaries from archives or compiling from source yourself.

Incidentally, let me offer a word on NPM usage. Incidentally…: Building with Node.js: Persistence. 10 Vital Aspects of Building a Node.JS Application. Purpose It sounds antagonisingly obvious, but the same goes for everything you decide to build. Your app needs to have purpose. A job to do. A problem to solve. Solid reasoning here will cement durable foundations for the application itself. It will help you visualise a path towards the solution, as well as maintaining focus on the ultimate goal when you get stuck in and iterate.

Structure Structure concerns source code layout, file arrangement, library/module usage and on the whole describes the way the application has been weaved together. Modularity. Deployment Your method of shipping applications to production can vary greatly depending on the nature of your stack. Manually SSH’ing into servers and cloning the git repository. This is by no means an exhaustive list of deploy methods, and you may need to be a bit creative to come up with a solution to best fit your needs. Configuration Virtually every application has constants and settings that will need to be changed at convenience. Logs. NodeJS on iOS — n8.io. Ok, I'm gonna try to keep this one short because I only have about 15 minutes to write this.

The long story short is that I got NodeJS compiled on my jailbroken iPhone 4! It was a long quest to get it working properly but I've done the hard work and compiled a .deb file compatible with Cydia for your installing pleasure... First, Installation So obviously you want to get it up and running first. The first thing I would do is SSH into your iPhone. So get the 'node-v0.4.5-ios-arm-1.deb' file from the link above (or a newer version if one exists), and get it onto your iDevice somehow (scp, wget, curl, etc.

. ) . $ dpkg -i node-v0.4.5-ios-arm-1.deb And that's it! The N90AP is the CPU my iPhone 4 is running, so hot damn, we're running node on an iPhone! Now What? The first thing I did was install npm. No seriously, what the hell use is node on an iPhone (or other iDevice?). The Node Beginner Book » A comprehensive Node.js tutorial.