github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

simonw / djangode

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 108
    • 8
  • Source
  • Commits
  • Network (8)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Utilities functions for node.js that borrow some useful concepts from Django — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

 
simonw (author)
Fri Nov 27 16:12:28 -0800 2009
commit  9218725b8e16800415e701c774e0099c4002d91b
tree    8c7c6ae374d88715bd20ecb4e8a5866a5e34055c
parent  f805510abcf804523eeaee1e94e80e7033b63953
djangode /
name age
history
message
file README.txt Fri Nov 20 02:06:16 -0800 2009 Added example.js and bulked out the readme a bit [simonw]
file djangode.js Fri Nov 27 16:05:40 -0800 2009 Fix for the previous too quick utf8-fix [voxpelli]
file example.js Fri Nov 27 16:12:28 -0800 2009 [simonw]
directory static-demo/ Fri Nov 20 02:06:16 -0800 2009 Added example.js and bulked out the readme a bit [simonw]
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.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server