chore: document and standardize hosts/ports across apps

This commit is contained in:
2025-09-10 01:21:15 +05:30
parent 701ff61214
commit 70cfff90ce
13 changed files with 218 additions and 42 deletions

View File

@@ -3,11 +3,18 @@ import dotenv from "dotenv";
dotenv.config();
const HOST = process.env.HOST;
const PORT = process.env.PORT;
const NODE_ENV = (
process.env.NODE_ENV ||
process.env.ENV ||
"development"
).toLowerCase();
const HOST = process.env.HOST || "0.0.0.0";
const PORT = Number(process.env.PORT) || 5000;
const server = app.listen(PORT, () => {
console.log(`✅ Server running at http://${HOST}:${PORT}`);
const server = app.listen(PORT, HOST, () => {
console.log(
`✅ Server running in ${NODE_ENV} mode at http://${HOST}:${PORT}`
);
});
// Handle startup errors