fix(core): mdns global config

This commit is contained in:
Adam
2025-12-26 14:47:44 -06:00
parent b2f45d574f
commit 390b0a79b3
6 changed files with 9 additions and 18 deletions

View File

@@ -1,4 +1,3 @@
import { Config } from "../../config/config"
import { Server } from "../../server/server"
import { cmd } from "./cmd"
import { withNetworkOptions, resolveNetworkOptions } from "../network"
@@ -8,8 +7,7 @@ export const ServeCommand = cmd({
builder: (yargs) => withNetworkOptions(yargs),
describe: "starts a headless opencode server",
handler: async (args) => {
const config = await Config.get()
const opts = resolveNetworkOptions(args, config)
const opts = await resolveNetworkOptions(args)
const server = Server.listen(opts)
console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
await new Promise(() => {})