MCPcopy Index your code
hub / github.com/cloudhead/node-static / callback

Function callback

bin/cli.js:111–119  ·  view source on GitHub ↗
(e, rsp)

Source from the content-addressed store, hash-verified

109require('http').createServer(function (request, response) {
110 request.addListener('end', function () {
111 var callback = function(e, rsp) {
112 if (e && e.status === 404) {
113 response.writeHead(e.status, e.headers);
114 response.end("Not Found");
115 log(request, response);
116 } else {
117 log(request, response);
118 }
119 };
120
121 if (argv['spa'] && request.url.indexOf(".") == -1) {
122 file.serveFile(argv['indexFile'], 500, {}, request, response);

Callers 3

node-static.jsFile · 0.85
util.jsFile · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…