From 5fa41a15f8f41c7f04d05a487ddb01930639f393 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sat, 22 Feb 2020 17:36:13 -0500 Subject: #2 Add CSS, favicon for landing page --- src/routes.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/routes.ts') diff --git a/src/routes.ts b/src/routes.ts index 92d3542..cacbf15 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -67,6 +67,15 @@ export default (metadata: Metadata): Router => { }) ); + // serve static files + // favicon should be served directly on root + router.get("/favicon.ico", (_, res) => { + res.sendFile(path.join(__dirname, "..", "public", "static", "favicon.ico")); + }); + router.use( + "/static", express.static(path.join(__dirname, "..", "public", "static")) + ); + // Upload HTML file router.post("/v1/:org/:repo/:branch/:commit.html", (req, res) => { const { org, repo, branch, commit } = req.params; -- cgit