mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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 = []
|
const listeners = []
|
||||||
async function listen (port) {
|
async function listen (port) {
|
||||||
const listener = await server.listen(port)
|
const listener = await server.listen(port, {
|
||||||
|
showURL: false,
|
||||||
|
isProd: true
|
||||||
|
})
|
||||||
listeners.push(listener)
|
listeners.push(listener)
|
||||||
return listeners
|
return listener
|
||||||
}
|
}
|
||||||
|
|
||||||
async function renderRoute (route = '/', renderContext = {}) {
|
async function renderRoute (route = '/', renderContext = {}) {
|
||||||
|
@ -78,8 +78,8 @@ export function createDevServer (nitroContext: NitroContext) {
|
|||||||
|
|
||||||
// Listen
|
// Listen
|
||||||
let listeners: Listener[] = []
|
let listeners: Listener[] = []
|
||||||
const _listen = async (port) => {
|
const _listen = async (port, opts?) => {
|
||||||
const listener = await listen(app, { port, showURL: false, isProd: true })
|
const listener = await listen(app, { port, ...opts })
|
||||||
listeners.push(listener)
|
listeners.push(listener)
|
||||||
return listener
|
return listener
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user