8000 GitHub - ahem/djangode: Utilities functions for node.js that borrow some useful concepts from Django · GitHub
[go: up one dir, main page]

Skip to content
< 7FFF link rel="preload" as="image" href="https://github.githubassets.com/assets/universe-9af583553ea01049.webp"/>
ahemPublic
forked from simonw/djangode

About

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

Resources

Stars

10 stars

Watchers

2 watching

Forks

 
 

Latest commit

 

History

49 Commits

Folders and files

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/core');
    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

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

0