An open API service indexing awesome lists of open source software.

https://github.com/potch/djanky

An altogether unnecesary little node framework inspired by Django
https://github.com/potch/djanky

Last synced: 10 months ago
JSON representation

An altogether unnecesary little node framework inspired by Django

Awesome Lists containing this project

README

          

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( , )`

##### 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.