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
- Host: GitHub
- URL: https://github.com/potch/djanky
- Owner: potch
- License: mit
- Created: 2012-09-23T03:51:10.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-09-24T22:47:57.000Z (over 13 years ago)
- Last Synced: 2025-08-09T04:42:56.789Z (11 months ago)
- Language: JavaScript
- Homepage: http://potch.github.com/djanky
- Size: 155 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.