Skip to content

Instantly share code, notes, and snippets.

@DracoBlue
Created May 9, 2010 19:51
Show Gist options
  • Save DracoBlue/395365 to your computer and use it in GitHub Desktop.
Save DracoBlue/395365 to your computer and use it in GitHub Desktop.
fs.readFile(this.files[uri], "binary", function(err, content) {
if (err) {
res.sendHeader(404, {
});
} else {
res.sendHeader(200, {
"Content-Type": mime_type,
"Cache-Control": "public, max-age=300"
});
res.write(content, "binary");
}
res.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment