node-static
node-static copied to clipboard
rfc 2616 compliant HTTP static-file server module, with built-in caching.
If .gz files are found, they should not be served if they are older then the file originally requested. As they are `stat`ed anyway, that should not add performance drawbacks,...
I'm looking for a way to route Google Bot to another view which is generated by phantomjs on the background. Many solution I find, they all use nginx. I don't...
i'm trying to use node.js for this task var static = require('node-static'); var file = new(static.Server)(__dirname+'/../public', { cache: 3600 }); require('http').createServer(function (request, response) { request.addListener('end', function () { file.serve(request, response);...
There's a piece of code: ``` this.stream(pathname, files, new(buffer.Buffer)(stat.size), res, function (e, buffer) { if (e) { return finish(500, {}) } exports.store[key] = { stat: stat, buffer: buffer, timestamp: Date.now()...
The headers sent back by the HEAD HTTP method should be identical to those for a GET, including the Content-Type and Content-Length. Just a minor compliance issue, though, I don't...
gzip
I added gzip support in .htaccess, but I still couldn't make it work. Is there any way to serve Gzip files using node-static? ref : "AddOutputFilterByType DEFLATE text/text text/html text/plain...
http:572 var statusLine = "HTTP/1.1 " + statusCode.toString() + " " TypeError: Cannot call method 'toString' of null For string 215 if (e) { return finish(null, {}) } Maybe 404...
I'm trying to build an app that serves the same page no matter what url is called (except when loading assets). strangely, it load the html file correctly the first...
https
Though it might be impractical to serve static files via https://, wonder why node-static refuses to serve _some_ files in secure mode (_no error_, just response content is missing), while...