refactor: Separate git watcher from terminal service
- Create dedicated git-watcher.ts with its own WebSocket server (port 4105) - Remove git watcher code from terminal.ts (no more PTY dependency) - Add /ws/git endpoint for Traefik routing - GitPage now connects to dedicated git WebSocket instead of terminal
This commit is contained in:
@@ -5,15 +5,16 @@
|
||||
* even when the main server restarts due to code changes.
|
||||
*/
|
||||
|
||||
import { startTerminalServer, startGitWatcher } from './services/terminal'
|
||||
import { startTerminalServer } from './services/terminal'
|
||||
import { startGitServer } from './services/git-watcher'
|
||||
import { WORKING_DIR } from './config'
|
||||
|
||||
console.log('')
|
||||
console.log('='.repeat(50))
|
||||
console.log('Terminal Server (Independent Process)')
|
||||
console.log(` WebSocket: ws://localhost:4103`)
|
||||
console.log(` Terminal WebSocket: ws://localhost:4103`)
|
||||
console.log(` Git WebSocket: ws://localhost:4105`)
|
||||
console.log(` Working Dir: ${WORKING_DIR}`)
|
||||
console.log(` Git Watcher: enabled`)
|
||||
console.log('')
|
||||
console.log('This process is stable and won\'t restart')
|
||||
console.log('when the main server reloads.')
|
||||
@@ -21,4 +22,4 @@ console.log('='.repeat(50))
|
||||
console.log('')
|
||||
|
||||
startTerminalServer()
|
||||
startGitWatcher()
|
||||
startGitServer()
|
||||
|
||||
Reference in New Issue
Block a user