UNPKG

git2prov

Version:

Unleash the potential of Git in the new W3C standard for provenance.

14 lines (12 loc) 408 B
/* This module routes the incoming requests to the correct handler */ var url = require("url"); function route(handle, request, response, next) { var pathname = url.parse(request.url).pathname; //console.log("Request for " + pathname + " received."); if (typeof handle[pathname] === "function") { return handle[pathname](request, response); } else { next(); } } exports.route = route;