Skip to content

Commit

Permalink
view: Clarify verbose file origin logs
Browse files Browse the repository at this point in the history
Updated the verbose logging to be technically correct:

- The index file is copied from the root to dist/, then served from
  there.
- Only favicon.png is served from the root given the subsequent lines of
  routing.
  • Loading branch information
victorlin committed Dec 6, 2022
1 parent 365b7fa commit f683486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const run = (args) => {
app.use(nakedRedirect({reverse: true})); /* redirect www.name.org to name.org */

const auspiceBuild = getAuspiceBuild();
utils.verbose(`Serving index / favicon etc from "${auspiceBuild.baseDir}"`);
utils.verbose(`Serving built javascript from "${auspiceBuild.distDir}"`);
utils.verbose(`Serving favicon from "${auspiceBuild.baseDir}"`);
utils.verbose(`Serving index and built javascript from "${auspiceBuild.distDir}"`);
app.get("/favicon.png", (req, res) => {res.sendFile(path.join(auspiceBuild.baseDir, "favicon.png"));});
app.use("/dist", expressStaticGzip(auspiceBuild.distDir, {maxAge: '30d'}));

Expand Down

0 comments on commit f683486

Please sign in to comment.