Перейти к файлу
Ian Bicking b5dcde98b1 Commit rest of files forgotten in last commit 2011-08-31 14:57:30 -05:00
static-demo Added example.js and bulked out the readme a bit 2009-11-20 10:06:16 +00:00
template Commit rest of files forgotten in last commit 2011-08-31 14:57:30 -05:00
template-demo Cleaned + Implemented half of default filters. 2009-12-12 22:51:22 +01:00
utils Commit rest of files forgotten in last commit 2011-08-31 14:57:30 -05:00
.gitignore Implemented basic handling of filters. 2009-12-10 02:06:14 +01:00
README.txt Added example.js and bulked out the readme a bit 2009-11-20 10:06:16 +00:00
TEMPLATES.md marked up links 2010-03-09 16:31:57 -07:00
djangode.js Fixed extractPost method 2010-03-19 09:19:51 +00:00
example.js Implemented url and regroup tags 2010-02-25 23:56:02 +01:00
license.txt Added BSD license 2010-02-16 11:07:07 +00:00
regression.py Added a couple of filters 2010-01-18 02:15:48 +01:00
template_example.js Added documentation for the templatesystem. 2010-03-10 00:17:56 +01:00

README.txt

djangode
========

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

    http://nodejs.org/
    http://www.djangoproject.com/

Example usage:

    var dj = require('./djangode');
    dj.serve(dj.makeApp([
        ['^/$', 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.