summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-19 21:43:10 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-19 21:49:45 +1100
commit240076a5d8ea85dd9c235fd0a1f5bbaed6b55c6e (patch)
tree0d239c89be66d8ec9613e37194e547de5e537c1c /src
parentFix UserSettings relation being in `select` rather than `relations` (diff)
downloadserver-240076a5d8ea85dd9c235fd0a1f5bbaed6b55c6e.tar.xz
Add basic information page to /
Diffstat (limited to 'src')
-rw-r--r--src/api/Server.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/api/Server.ts b/src/api/Server.ts
index 49229494..dbe61444 100644
--- a/src/api/Server.ts
+++ b/src/api/Server.ts
@@ -38,6 +38,15 @@ import { ErrorHandler } from "./middlewares/ErrorHandler";
 import { initRateLimits } from "./middlewares/RateLimit";
 import { initTranslation } from "./middlewares/Translation";
 import { initInstance } from "./util/handlers/Instance";
+import express from "express";
+
+const PUBLIC_ASSETS_FOLDER = path.join(
+	__dirname,
+	"..",
+	"..",
+	"assets",
+	"public",
+);
 
 export type FosscordServerOptions = ServerOptions;
 
@@ -126,6 +135,8 @@ export class FosscordServer extends Server {
 		app.use("/api/v9", api);
 		app.use("/api", api); // allow unversioned requests
 
+		app.get("/", express.static(PUBLIC_ASSETS_FOLDER));
+
 		this.app.use(ErrorHandler);
 
 		Sentry.errorHandler(this.app);