node-beginner-router

node v5.12.0
version: 1.0.9
endpointsharetweet
function route(handle, pathname, response, postData) { if (typeof handle[pathname] === 'function') { return handle[pathname](response, postData); } else { response.writeHead(404, {"Content-Type": "text/plain"}); response.write("404 Not found\nNo request handler found for " + pathname); response.end(); } } exports.route = route;
Loading…

no comments

    sign in to comment