← 教程列表
news

Startup Sequence

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 9 阅读

1. Create `SCREEN_DIR` if it doesn't exist (`mkdirSync` recursive) 2. Load frame template and helper.js from `__dirname` 3. Start HTTP server on configured host/port 4. Start `fs.watch` on `SCREEN_DIR` 5. On successful listen, log `server-started` JSON to stdout: `{ type, port, host, url_host, url, screen_dir }` 6. Write the same JSON to `SCREEN_DIR/.server-info` so agents can find connection details when stdout is hidden (background execution)

← 返回教程列表 AI8899 · 内容仅供学习参考