Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
const staticAssetsFromFilesystem = { /* Express static asset serving middleware */ };
const fallbackToStaticAssetsFromS3 = { /* Custom middleware that calls out to S3 */ };
app.use(`/public`, staticAssetsFromFilesystem, fallbackToStaticAssetsFromS3);
'X-Served-From': 'fallback'
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