mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 08:43:02 +00:00
Add basic information page to /
This commit is contained in:
2 files changed
+75
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user