An altogether unnecesary little node framework inspired by Django
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitignore
LICENSE
README.md
demo.js
djanky.js
package.json

README.md

Djanky

An altogether unnecessary little web framework inspired by Django

Quick Hits

var djanky = require('djanky');

function index(request, response, name) {
    return 'Hello, ' + name + '!';
}

var routes = [
    ['^/(.*)$', index, 'index']
];

var server = new djanky.Server(1337, routes);

server.start();

Exposed Objects

Server

The core Djanky class.

Constructor

new djanky.Server( <port>, <routes> )

Parameters
  • port - The port to listen to. Defaults to 8080.
  • routes - an Array of routes, stored as an Array of 3 values:
    • [_pattern_, _handler_, _name_]

Error404

  • TODO: write this.

Error500

  • TODO: write this.