summary refs log tree commit diff
path: root/src/bundle/Server.ts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-20 22:04:43 +0100
committerRory& <root@rory.gay>2025-12-20 22:04:43 +0100
commit55d75824d261e9e14ac0f63becacaad96a546258 (patch)
treee0357342d4ff967dd00b80429e6735f3a34d4939 /src/bundle/Server.ts
parentCommit evil (set process names) (diff)
downloadserver-ts-55d75824d261e9e14ac0f63becacaad96a546258.tar.xz
Forgot about bundle
Diffstat (limited to 'src/bundle/Server.ts')
-rw-r--r--src/bundle/Server.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts

index bcc567d7..7dfe0081 100644 --- a/src/bundle/Server.ts +++ b/src/bundle/Server.ts
@@ -29,6 +29,8 @@ import { CDNServer } from "@spacebar/cdn"; import express from "express"; import { green, bold } from "picocolors"; import { Config, initDatabase } from "@spacebar/util"; +import fs from "fs"; +import cluster from "cluster"; const app = express(); const server = http.createServer(); @@ -75,6 +77,9 @@ async function main() { await new Promise((resolve) => server.listen({ port }, () => resolve(undefined))); await Promise.all([api.start(), cdn.start(), gateway.start(), webrtc.start()]); + if (fs.existsSync("/proc/self/comm")) fs.writeFileSync("/proc/self/comm", `spacebar-bundle-${cluster.worker ? cluster.worker.id : port}`); + process.title = `sb-bundle-${cluster.worker ? cluster.worker.id : port}`; + console.log(`[Server] ${green(`Listening on port ${bold(port)}`)}`); }