about summary refs log tree commit diff stats
path: root/src/index.ts
diff options
context:
space:
mode:
authorAlan Pearce2024-04-17 20:28:04 +0200
committerAlan Pearce2024-04-17 20:53:45 +0200
commit30fed9da228ef9bab5734e000e598ff380cb55f5 (patch)
treecfc89a40a12dcc572c0a457b62bdde129690e482 /src/index.ts
parent1e05c18ed8e44078e3e102ff5bb8af6e25717fc9 (diff)
downloadwebsite-30fed9da228ef9bab5734e000e598ff380cb55f5.tar.lz
website-30fed9da228ef9bab5734e000e598ff380cb55f5.tar.zst
website-30fed9da228ef9bab5734e000e598ff380cb55f5.zip
bye bye bun
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/index.ts b/src/index.ts
deleted file mode 100644
index 30a6f34..0000000
--- a/src/index.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { performance } from "node:perf_hooks";
-
-performance.mark("startup-begin");
-
-import log from "loglevel";
-
-import { server, metricsServer } from "./app";
-
-log.setLevel((import.meta.env["LOG_LEVEL"] || "info") as log.LogLevelDesc);
-
-const metricsServed = Bun.serve(metricsServer);
-log.info(`Metrics server started on port ${metricsServed.port}`);
-
-const served = Bun.serve(server);
-log.info(`Serving website on ${served.url}`);
-
-process.on("SIGTERM", function () {
-  log.info("SIGTERM received, shutting down...");
-  metricsServed.stop();
-  served.stop();
-  process.exit(0);
-});
-
-process.on("SIGINT", function () {
-  log.info("SIGINT received, shutting down...");
-  metricsServed.stop();
-  served.stop();
-  process.exit(0);
-});
-
-performance.mark("startup-end");
-
-performance.measure("startup", "startup-begin", "startup-end");
-for (const entry of performance.getEntriesByName("startup")) {
-  log.info(`Startup took ${entry.duration} ms`);
-}