Add basic information page to /
This commit is contained in:
parent
4d06b86d7b
commit
240076a5d8
64
assets/public/index.html
Normal file
64
assets/public/index.html
Normal file
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fosscord Server</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
background-color: rgb(10, 10, 10);
|
||||
color: white;
|
||||
font-size: 1.1rem;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 40px 0 40px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#wordmark {
|
||||
width: min(500px, 50%);
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #FF6D2E;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<img alt="Fosscord Logo"
|
||||
id="wordmark"
|
||||
src="https://raw.githubusercontent.com/fosscord/fosscord/master/assets-rebrand/svg/Fosscord-Wordmark-Gradient.svg" />
|
||||
|
||||
<h1>Welcome!</h1>
|
||||
<p>If you're viewing this page, that means you've successfully set up your very own Fosscord instance!</p>
|
||||
<p>For information on how to configure your shiny new setup, you should visit <a href="https://docs.fosscord.com">our documentation</a></p>
|
||||
<p>For information on how to connect and use your instance, <a href="https://docs.fosscord.com/setup/clients">click here</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user