From b5efcdabc57bc2376183ae60385e3351098cdcd0 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 9 Nov 2018 12:53:43 -0500 Subject: [PATCH] Add custom public/assets/img to site --- server/index.js | 5 +++++ site/public/.gitkeep | 0 site/public/assets/img/.gitkeep | 0 3 files changed, 5 insertions(+) create mode 100644 site/public/.gitkeep create mode 100644 site/public/assets/img/.gitkeep diff --git a/server/index.js b/server/index.js index c42faa80..c82ccb99 100644 --- a/server/index.js +++ b/server/index.js @@ -62,6 +62,11 @@ function Server () { // Support per-request http-context app.use(httpContext.middleware); + // 'express.static' to serve static files from site/public directory + const sitePublicPath = Path.resolve(process.cwd(), 'site/public'); + app.use(express.static(sitePublicPath)); + logger.info(`serving static files from site static path at ${sitePublicPath}.`); + // 'express.static' to serve static files from public directory const publicPath = Path.resolve(process.cwd(), 'public'); app.use(express.static(publicPath)); diff --git a/site/public/.gitkeep b/site/public/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/site/public/assets/img/.gitkeep b/site/public/assets/img/.gitkeep new file mode 100644 index 00000000..e69de29b