Last active
July 18, 2017 03:28
-
-
Save joelrobotham/d706b631032d8a0a7828037db24bb910 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
const staticAssetsFromFilesystem = { /* Express static asset serving middleware */ }; | |
const fallbackToStaticAssetsFromS3 = { /* Custom middleware that calls out to S3 */ }; | |
app.use(`/public`, staticAssetsFromFilesystem, fallbackToStaticAssetsFromS3); |
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
'X-Served-From': 'fallback' |
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
appLogger.log("Fallback static asset retrieved from: " + url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment