Socket
Book a DemoInstallSign in
Socket

djanky

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djanky

An itty bitty web framework, loosely inspired by Django

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 24 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts