mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 03:04:21 +01:00
fix port issue
This commit is contained in:
@@ -43,6 +43,10 @@ cli.command("", "Start the opencode in interactive mode").action(async () => {
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
stdin: "inherit",
|
||||
env: {
|
||||
...process.env,
|
||||
OPENCODE_SERVER: server.url.toString(),
|
||||
},
|
||||
onExit: () => {
|
||||
server.stop()
|
||||
},
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Global } from "../global"
|
||||
|
||||
export namespace Server {
|
||||
const log = Log.create({ service: "server" })
|
||||
const PORT = 16713
|
||||
|
||||
export type Routes = ReturnType<typeof app>
|
||||
|
||||
@@ -401,7 +400,7 @@ export namespace Server {
|
||||
|
||||
export function listen() {
|
||||
const server = Bun.serve({
|
||||
port: PORT,
|
||||
port: 0,
|
||||
hostname: "0.0.0.0",
|
||||
idleTimeout: 0,
|
||||
fetch: app().fetch,
|
||||
|
||||
Reference in New Issue
Block a user