fix: allow dynamic server port via environment variable

Replaced hardcoded port 3000 with process.env.PORT in src/index.tsx to support custom deployment environments.
This commit is contained in:
Giulio Librando 2026-02-02 23:03:40 +01:00 committed by GitHub
parent cd32144bce
commit b08bcca847
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,7 +65,7 @@ if (process.env.NODE_ENV !== "production") {
});
}
app.listen(3000);
app.listen(process.env.PORT || 3000);
console.log(`🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}${WEBROOT}`);