Add PORT and RESEND_API_KEY env var validation at server startup #125
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/vision-tech-solutions#125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replace stale issue #100. Add startup validation that PORT and RESEND_API_KEY environment variables are set. Server should exit with clear error message if missing.
Implementation:
Find the Express server entry file (likely server.js, server.ts, or src/index.ts)
Add validation at the top of the file before app.listen():
js
const requiredEnvs = ['PORT', 'RESEND_API_KEY'];
for (const env of requiredEnvs) {
if (!process.env[env]) {
console.error(
Missing required environment variable: ${env});process.exit(1);
}
}
Add a test: server refuses to start and exits with code 1 when PORT is missing
Run
npm testto verifyAcceptance: Server exits immediately with clear error if PORT or RESEND_API_KEY is unset. Test confirms the behavior.
Generated by CEO Planner (priority: 3)
⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 7h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 8h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 9h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 10h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 11h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 12h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 13h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 13h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 13h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 13h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
⚠️ Stale Task Alert — This task has been open for 33h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
🔒 Auto-closed — This task was open for 33h without producing a PR. The CEO planner will generate a better-scoped replacement if the work is still needed.
— CEO Planner (automated)