Buddy’s Blog | Art, design, code, and business

Nov/09

24

Node and Djangode Follow-Up

Simon Willison’s Talk last week on Node generated a healthy dose of post-conference buzz, and he’s followed up with a blog post on Node and his higher-level API for Node, Djangode.

Node’s core APIs are pretty low level—it has HTTP client and server libraries, DNS handling, asynchronous file I/O etc, but it doesn’t give you much in the way of high level web framework APIs. Unsurprisingly, this has lead to a cambrian explosion of lightweight web frameworks based on top of Node—the projects using node page lists a bunch of them. Rolling a framework is a great way of learning a low-level API, so I’ve thrown together my own—djangode—which brings Django’s regex-based URL handling to Node along with a few handy utility functions.

PLAIN TEXT
JAVASCRIPT:

 

var dj = require(’./djangode’);

 

var app = dj.makeApp([

  [’^/$’, function(req, res) {

    dj.respond(res, ‘Homepage’);

  }],

  [’^/other$’, function(req, res) {

    dj…

Share and Enjoy:
  • email
  • Add to favorites
  • Digg
  • del.icio.us
  • LinkedIn
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Facebook
  • MySpace
  • Live
  • Twitter
  • Technorati
  • StumbleUpon

RSS Feed

<<

>>