aboutsummaryrefslogtreecommitdiff
path: root/src/routes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes.ts')
-rw-r--r--src/routes.ts9
1 files changed, 9 insertions, 0 deletions
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;