mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
chore: allow passing listhen options
This commit is contained in:
parent
5248905dd7
commit
fff38618fe
@ -102,9 +102,12 @@ function createNuxt2DevServer (nitroContext: NitroContext) {
|
||||
|
||||
const listeners = []
|
||||
async function listen (port) {
|
||||
const listener = await server.listen(port)
|
||||
const listener = await server.listen(port, {
|
||||
showURL: false,
|
||||
isProd: true
|
||||
})
|
||||
listeners.push(listener)
|
||||
return listeners
|
||||
return listener
|
||||
}
|
||||
|
||||
async function renderRoute (route = '/', renderContext = {}) {
|
||||
|
@ -78,8 +78,8 @@ export function createDevServer (nitroContext: NitroContext) {
|
||||
|
||||
// Listen
|
||||
let listeners: Listener[] = []
|
||||
const _listen = async (port) => {
|
||||
const listener = await listen(app, { port, showURL: false, isProd: true })
|
||||
const _listen = async (port, opts?) => {
|
||||
const listener = await listen(app, { port, ...opts })
|
||||
listeners.push(listener)
|
||||
return listener
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user