Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.
/ djangode Public archive
forked from simonw/djangode

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

Notifications You must be signed in to change notification settings

voxpelli/djangode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 100.0%