From 946a06e78adc1f0c45bae0740540c33c750d556f Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 17 Sep 2024 17:48:12 -0500 Subject: [PATCH] fix: build serve --- server.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index e5469b2..3605eab 100644 --- a/server.js +++ b/server.js @@ -83,6 +83,9 @@ else { '/assets', express.static('build/client/assets', { immutable: true, maxAge: '1y' }) ); + // Everything else (like favicon.ico) is cached for an hour. You may want to be + // more aggressive with this caching. + app.use(express.static('build/client', { maxAge: '1h' })); } // silphius resources @@ -91,10 +94,6 @@ app.use( express.static('resources', { maxAge: '1h' }), ); -// Everything else (like favicon.ico) is cached for an hour. You may want to be -// more aggressive with this caching. -app.use(express.static('build/client', { maxAge: '1h' })); - app.use(morgan('tiny')); // handle SSR requests