Created
June 20, 2017 10:00
-
-
Save warlock/4739484eb5e7d08a8d521ac76425df66 to your computer and use it in GitHub Desktop.
Express Static Cache
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
app.configure('production', function() { | |
var oneYear = 31557600000; | |
app.use(express.static(__dirname + '/public', { maxAge: oneYear })); | |
app.use(express.errorHandler());}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment