Files
claude-mem/ecosystem.config.cjs
T
Alex Newman 4bc467f7ed feat: Implement Worker Service for long-running HTTP service with PM2 management
- Introduced WorkerService class to handle HTTP requests and manage sessions.
- Added endpoints for health check, session management, and data retrieval.
- Integrated ChromaSync for background data synchronization.
- Implemented SSE for real-time updates to connected clients.
- Added error handling and logging throughout the service.
- Cached Claude executable path for improved performance.
- Included settings management for user configuration.
- Established database interactions for session and observation management.
2025-11-07 13:26:13 -05:00

39 lines
1.0 KiB
JavaScript

/**
* PM2 Ecosystem Configuration for claude-mem Worker Service
*
* Usage:
* pm2 start ecosystem.config.cjs
* pm2 stop claude-mem-worker
* pm2 restart claude-mem-worker
* pm2 logs claude-mem-worker
* pm2 status
*/
module.exports = {
apps: [
{
name: 'claude-mem-worker',
script: './plugin/scripts/worker-service.cjs',
// INTENTIONAL: Watch mode enables auto-restart on plugin updates
//
// Why this is enabled:
// - When you run `npm run sync-marketplace` or rebuild the plugin,
// files in ~/.claude/plugins/marketplaces/thedotmack/ change
// - Watch mode detects these changes and auto-restarts the worker
// - Users get the latest code without manually running `pm2 restart`
//
// This is a feature, not a bug - it ensures users always run the
// latest version after plugin updates.
watch: true,
ignore_watch: [
'node_modules',
'logs',
'*.log',
'*.db',
'*.db-*',
'.git'
]
}
]
};