about summary refs log tree commit diff stats
path: root/src/index.ts
blob: c18ebb21652d20b09cc9d65374ccb55ee9c4ace7 (plain)
1
2
3
4
5
6
7
8
9
10
11
import log from "loglevel";

import { server, metricsServer } from "./app";

log.setLevel((Bun.env.LOG_LEVEL || "info") as log.LogLevelDesc);

const metricsServed = Bun.serve(metricsServer);
console.info(`Metrics server started on port ${metricsServed.port}`);

const served = Bun.serve(server);
console.info(`Serving website on http://${served.hostname}:${served.port}/`);