From sundial-org-awesome-openclaw-skills-4
Manages Node.js apps with PM2 process manager: deploy, monitor, view logs, auto-restart, boot startup, and multi-process handling in production.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4This skill uses the workspace's default tool permissions.
Production process manager for Node.js with built-in load balancer.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Production process manager for Node.js with built-in load balancer.
npm install -g pm2
# Start an app
pm2 start app.js
pm2 start npm --name "my-app" -- start
pm2 start "npm run start" --name my-app
# With specific port/env
pm2 start npm --name "my-app" -- start -- --port 3000
PORT=3000 pm2 start npm --name "my-app" -- start
# List processes
pm2 list
pm2 ls
# Logs
pm2 logs # All logs
pm2 logs my-app # Specific app
pm2 logs --lines 100 # Last 100 lines
# Control
pm2 restart my-app
pm2 stop my-app
pm2 delete my-app
pm2 reload my-app # Zero-downtime reload
# Info
pm2 show my-app
pm2 monit # Real-time monitor
# Save current process list
pm2 save
# Generate startup script (run the output command with sudo)
pm2 startup
# Example output - run this:
# sudo env PATH=$PATH:/opt/homebrew/bin pm2 startup launchd -u username --hp /Users/username
# Build first
npm run build
# Start production server
pm2 start npm --name "my-app" -- start
# Or with ecosystem file
pm2 start ecosystem.config.js
module.exports = {
apps: [{
name: 'my-app',
script: 'npm',
args: 'start',
cwd: '/path/to/app',
env: {
NODE_ENV: 'production',
PORT: 3000
}
}]
}
| Flag | Description |
|---|---|
--name | Process name |
--watch | Restart on file changes |
-i max | Cluster mode (all CPUs) |
--max-memory-restart 200M | Auto-restart on memory limit |
--cron "0 * * * *" | Scheduled restart |
pm2 delete all # Remove all processes
pm2 kill # Kill PM2 daemon
pm2 unstartup # Remove startup script