Skip to content
Utilities functions for node.js that borrow some useful concepts from Django
JavaScript Python
Latest commit f99a38f Mar 19, 2010 Simon Willison Fixed extractPost method



Utility functions for node.js that imitate some useful concepts from Django.

Example usage:

    var dj = require('./djangode');
        ['^/$', function(req, res) {
            dj.respond(res, '<h1>Homepage</h1>');
        ['^/other$', function(req, res) {
            dj.respond(res, '<h1>Other page</h1>');
        ['^/page/(\\d+)$', function(req, res, page) {
            dj.respond(res, '<h1>Page ' + page + '</h1>');
    ]), 8008); // Serves on port 8008

Run "node example.js" for a slightly more interesting example.
Something went wrong with that request. Please try again.