$ show Unitech/pm2
PM2 is a production process manager for Node.js applications with built-in load balancing, monitoring, and deployment capabilities. It keeps applications alive forever, enables zero-downtime reloads, and provides comprehensive system administration features. The architecture features a daemon-based design with CLI and programmatic APIs communicating via IPC (pm2-axon). Key capabilities include process clustering, log management, metrics collection, Docker integration, startup script generation, and a plugin system for extensibility. The codebase demonstrates strong engineering practices with internalized dependencies to reduce supply chain risk, comprehensive test coverage, and active maintenance with regular updates supporting Node.js >=18 and Bun.
The LLM identified 3 files worth highlighting for reuse:
A standalone JSON5 parser implementation that extends JSON with comments, trailing commas, and unquoted keys. Zero internal dependencies, making it easily extractable for any project requiring JSON5 support. Demonstrates non-obvious skill in handling edge cases and maintaining full JSON5 specification compliance.
Cross-platform utility for killing process trees (including all child processes). Isolates OS-specific signal handling and process reaping complexity. Self-contained with minimal dependencies (only built-in modules), suitable for reuse in any Node.js process management tool. Shows craftsmanship in handling zombie processes and platform variations.
A reusable RPC library providing request/reply, pub/sub, and push/pull socket patterns based on ZeroMQ concepts. Includes comprehensive test suite and was internalized by PM2 to reduce supply chain risk. Features connection handling, message queuing, and flexible transport layers. Demonstrates skill in abstracting IPC complexities while maintaining high performance and reliability.