-
-
Save anonymous/0471f420c42b4b4e101b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.readFile('index.html', 'utf8', function (err, html) { | |
if (err) throw err; | |
var my_template = require("./index"); | |
var output = my_template.render(content); | |
var headers = [[ 'Content-Type', 'text/html' ], | |
[ 'Cache-Control', 'no-cache, no-store, must-revalidate'], | |
[ 'Pragma', 'no-cache'], | |
[ 'Expires', '0' ]]; | |
_.each(headers, function(header) { | |
res.setHeader(header[1], header[2]); | |
}); | |
res.send(output); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment