confia-form-backend / server.js
elsamueldev's picture
Upload 6 files
e1dafe2 verified
raw
history blame
425 Bytes
import { createApp } from "./app.js";
import { DiscordWebhook } from "./discord-webhook.js";
const webhookUrl = process.env.WEBHOOK_URL;
if (!webhookUrl) {
console.error("WEBHOOK_URL environment variable is not set.");
process.exit(1);
}
const PORT = process.env.PORT ?? 80;
const app = createApp(new DiscordWebhook(webhookUrl));
app.listen(PORT, () => {
console.log(`Server is listening on port ${PORT}`);
});