← Files Sulekha EventsARCHIVED FILE
source/server.js
611 Bytes · Nov 30, 2026 · 07:53 UTC
const { loadEnvFile } = require("node:process");
const { join } = require("node:path");
// Production settings come from Azure/IIS, never a developer's local .env.
if (process.env.NODE_ENV !== "production") {
try {
loadEnvFile(join(__dirname, ".env"));
} catch (error) {
if (error.code !== "ENOENT") throw error;
}
}
// IIS may require this entry point directly. Keep the module graph synchronous;
// load the application asynchronously instead of using top-level await.
import("./src/server.js").catch((error) => {
console.error("Sulekha startup failed:", error);
process.exitCode = 1;
});
SHA-256: 5fec19d904c6be159cd09cd795eb9d3c19d8c1ac2713a87130133a6013e7dc86