19 lines
507 B
JavaScript
19 lines
507 B
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Daemon entry point - runs process management server
|
|
* This should only be run directly by the CLI or as a systemd service
|
|
*/
|
|
|
|
export { startDaemon } from './tspm.daemon.js';
|
|
|
|
// When executed directly (not imported), start the daemon
|
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
import('./tspm.daemon.js').then(({ startDaemon }) => {
|
|
startDaemon().catch((error) => {
|
|
console.error('Failed to start daemon:', error);
|
|
process.exit(1);
|
|
});
|
|
});
|
|
}
|