We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c81506b commit deb92b9Copy full SHA for deb92b9
1 file changed
packages/opencode/src/cli/cmd/serve.ts
@@ -25,7 +25,16 @@ export const ServeCommand = cmd({
25
hostname,
26
})
27
console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
28
+
29
+ const stop = async () => {
30
+ console.log("stopping server...")
31
+ await server.stop()
32
+ process.exit(0)
33
+ }
34
35
+ process.on("SIGTERM", stop)
36
+ process.on("SIGINT", stop)
37
38
await new Promise(() => {})
- await server.stop()
39
},
40
0 commit comments