summary refs log tree commit diff
path: root/src/bundle
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-09-28 16:10:57 +0000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-09-28 16:10:57 +0000
commitc82b71695d16b0ef19d5e976ea7ca47c62ef3345 (patch)
treefed0e8bc0273ec8fa4255a0aa40d29454d9066e6 /src/bundle
parentap guild endpoint (diff)
downloadserver-ts-c82b71695d16b0ef19d5e976ea7ca47c62ef3345.tar.xz
send Follow request to guild when remote invite code used
Diffstat (limited to 'src/bundle')
-rw-r--r--src/bundle/Server.ts11
-rw-r--r--src/bundle/index.ts5
2 files changed, 12 insertions, 4 deletions
diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts

index 72d38603..d76875e5 100644 --- a/src/bundle/Server.ts +++ b/src/bundle/Server.ts
@@ -23,7 +23,12 @@ import { FederationServer } from "@spacebar/ap"; import * as Api from "@spacebar/api"; import { CDNServer } from "@spacebar/cdn"; import * as Gateway from "@spacebar/gateway"; -import { Config, Sentry, initDatabase } from "@spacebar/util"; +import { + Config, + Sentry, + initDatabase, + setupMorganLogging, +} from "@spacebar/util"; import express from "express"; import http from "http"; import { bold, green } from "picocolors"; @@ -35,9 +40,9 @@ const production = process.env.NODE_ENV == "development" ? false : true; server.on("request", app); const api = new Api.SpacebarServer({ server, port, production, app }); +const federation = new FederationServer({ server, port, production, app }); const cdn = new CDNServer({ server, port, production, app }); const gateway = new Gateway.Server({ server, port, production }); -const federation = new FederationServer({ server, port, production, app }); process.on("SIGTERM", async () => { console.log("Shutting down due to SIGTERM"); @@ -53,6 +58,8 @@ async function main() { await Config.init(); await Sentry.init(app); + setupMorganLogging(app); + await new Promise((resolve) => server.listen({ port }, () => resolve(undefined)), ); diff --git a/src/bundle/index.ts b/src/bundle/index.ts
index c6af4f00..8b1c9429 100644 --- a/src/bundle/index.ts +++ b/src/bundle/index.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ +export * from "@spacebar/ap"; export * from "@spacebar/api"; -export * from "@spacebar/util"; -export * from "@spacebar/gateway"; export * from "@spacebar/cdn"; +export * from "@spacebar/gateway"; +export * from "@spacebar/util";