Dashboard › Code › startServer() returns plain object, not…
019e49d5-15c4-78d1-8bbc-f43fde34d9f1| Project | Hits | Last recalled |
|---|---|---|
| opencode | 3 | 8d ago |
| opencode-lore | 9 | 23d ago |
Gateway startup traps: (1) startServer() returns { stop, port, hosts } synchronously — use startGateway() from cli/start.ts for Promise<GatewayHandle>. (2) loadConfig() in config.ts is SYNC — calling .then() throws TypeError. (3) EADDRINUSE fires as async 'error' event — wrap server.listen() in a Promise. (4) Use port 0 (ephemeral) in tests. (5) In-process callers MUST pass local:true — hosted mode disables FS ops in @loreai/core (breaks getGitRemote(), .lore.md import, config loading). (6) lore run and lore import always set opts.local=true.