Skip to content

Commit

Permalink
fix: pass hostname to getPort as well (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Aug 3, 2022
1 parent f4ab4f7 commit 0ced0a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Expand Up @@ -78,7 +78,10 @@ export async function listen (handle: http.RequestListener, opts: Partial<Listen
opts.clipboard = false
}

const port = await getPort(opts.port)
const port = await getPort({
port: Number(opts.port),
host: opts.hostname
})

let server: http.Server | https.Server
let url: string
Expand Down

0 comments on commit 0ced0a4

Please sign in to comment.