semi-thicker, but eh works now

This commit is contained in:
user
2026-03-02 19:46:58 +02:00
parent a7ed537b07
commit 5c84f4a672
3 changed files with 27 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"prod": "PORT=3000 HOST=0.0.0.0 node dist/index.js"
"prod": "HOST=0.0.0.0 PORT=3000 tsx src/index.ts"
},
"dependencies": {
"@opentelemetry/api": "^1.9.0",

View File

@@ -7,6 +7,8 @@ import { Hono } from "hono";
const app = new Hono();
app.use("*", httpTelemetryMiddleware);
const host = process.env.HOST || "0.0.0.0";
const port = Number(process.env.PORT || "3000");
app.get("/health", (c) => {
return c.json({ ok: true });
@@ -21,9 +23,10 @@ app.route("/api/v1/mobile", mobileRouter);
serve(
{
fetch: app.fetch,
port: 3000,
port,
hostname: host,
},
(info) => {
console.log(`Server is running on http://localhost:${info.port}`);
console.log(`Server is running on http://${host}:${info.port}`);
},
);