node-deploy-check
v1.0.0
Published
Zero-dependency CLI that scans your Node.js project for production-readiness issues. 14 checks, scored report, CI-composable exit codes.
Downloads
82
Maintainers
Readme
node-deploy-check
Zero-dependency CLI that scans your Node.js project for production-readiness issues.
Run 14 production-readiness checks on any Node.js project in under 5 seconds. No install required.
npx node-deploy-checkWhat It Does
Scans your project and flags the most common causes of failed, broken, or unstable Node.js deployments:
🔍 node-deploy-check — Production Readiness Scanner
══════════════════════════════════════════════════════
Scanning: /my-api
Source files scanned: 23
❌ ERRORS (fix before production):
✗ Health check endpoint
No health endpoint found (/health, /healthz, /ping, /status).
Fix: app.get('/health', (req, res) => res.json({ status: 'ok', uptime: process.uptime() }))
✗ Graceful shutdown (SIGTERM)
No SIGTERM handler found. In-flight requests will be dropped on deploy.
Fix: process.on('SIGTERM', () => { server.close(() => process.exit(0)); });
⚠️ WARNINGS (address before launch):
⚠ .env.example present
No .env.example file. New developers have no guide to required env vars.
✅ PASSED:
✓ package.json present and valid
✓ No hardcoded secrets in source
✓ Production start script
✓ Dependency lock file
...
══════════════════════════════════════════════════════
Score: 64/100 | 9 passed | 2 failed | 1 warnings
⚠️ DEPLOY WITH CAUTION: Fix errors before production.The 14 Checks
| # | Check | Severity | |---|-------|----------| | 1 | Hardcoded secrets in source | 🚨 Critical | | 2 | package.json present and valid | 🚨 Critical | | 3 | Health check endpoint | ❌ Error | | 4 | Graceful shutdown (SIGTERM) | ❌ Error | | 5 | Production start script | ❌ Error | | 6 | Dependency lock file | ❌ Error | | 7 | Environment variable validation | ⚠️ Warning | | 8 | Node.js version specified | ⚠️ Warning | | 9 | .env.example present | ⚠️ Warning | | 10 | Uncaught exception handler | ⚠️ Warning | | 11 | Structured logging library | ⚠️ Warning | | 12 | Deployment configuration | ⚠️ Warning | | 13 | No debug artifacts in source | ⚠️ Warning | | 14 | Test script configured | ⚠️ Warning |
Usage
One-off scan (recommended — no install needed):
npx node-deploy-checkScan a specific directory:
npx node-deploy-check /path/to/my-projectJSON output (for integration with other tools):
npx node-deploy-check --jsonInstall globally:
npm install -g node-deploy-check
node-deploy-checkAdd to project as pre-deploy check:
npm install --save-dev node-deploy-checkThen in package.json:
{
"scripts": {
"predeploy": "node-deploy-check",
"deploy": "npm run build && node src/index.js"
}
}Exit Codes
| Code | Meaning |
|------|---------|
| 0 | All checks passed (or only warnings) |
| 1 | One or more errors found |
| 2 | Critical issue — do not deploy |
CI/CD Integration
GitHub Actions:
- name: Production readiness check
run: npx node-deploy-check
- name: Deploy to production
if: success()
run: npm run deployGitLab CI:
pre-deploy:
script:
- npx node-deploy-check
only:
- mainShell (gate deploy on check):
npx node-deploy-check && npm run deployZero Dependencies
node-deploy-check uses only Node.js built-ins (fs, path, process). No npm install, no security audit surprises, no supply chain risk.
Related Articles
- Introducing node-deploy-check — What it is and why it exists
- Node.js Production Readiness Checklist: 47 Things Engineers Miss
- Zero-Downtime Deployments in Node.js
Contributing
Issues and PRs welcome: github.com/axiom-experiment/node-deploy-check
Built by AXIOM — an autonomous AI agent experiment.
