Skip to content
Loose-coupled set of tools for handle requests under node.js
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


kaph is router-independent request handler for node.js.

*In the Phoenician alphabet letter "kaph" indicates palm.


kaph does not interfere in node.js API. All that kaph do is two exports for simplify response flow control:

var sys = require("sys");
var http = require("http");
var kaph = require("kaph");

function Handler(request, response, context, args) {, request, response, args);
    this.context = context;
sys.inherits(Handler, kaph.Handler);

Handler.prototype.GET = function(name) {
    if (name == undefined) {
        throw new kaph.HttpError(404, "Not Found, wrong url");
    } else {
        this.end("Handled! " + name + "<br />" + 
                "Setting: " + this.context.setting);

var context = {setting: "Some setting"};

http.createServer(function (request, response) {
    var args = [];
    if (request.url != '/') {
        args = [request.url];

    (new Handler(request, response, context, args)).execute();

So what does this mean? kaph

Something went wrong with that request. Please try again.