Spaces:
Sleeping
Sleeping
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}`); | |
}); |