This repository was archived by the owner on Apr 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change
1
+ import type { AddressInfo } from 'node:net'
1
2
import { resolve , relative , normalize } from 'pathe'
2
3
import chokidar from 'chokidar'
3
4
import { debounce } from 'perfect-debounce'
@@ -75,7 +76,12 @@ export default defineNuxtCommand({
75
76
}
76
77
77
78
await currentNuxt . ready ( )
79
+
78
80
await currentNuxt . hooks . callHook ( 'listen' , listener . server , listener )
81
+ const address = listener . server . address ( ) as AddressInfo
82
+ currentNuxt . options . server . port = address . port
83
+ currentNuxt . options . server . host = address . address
84
+
79
85
await Promise . all ( [
80
86
writeTypes ( currentNuxt ) . catch ( console . error ) ,
81
87
buildNuxt ( currentNuxt )
Original file line number Diff line number Diff line change @@ -135,7 +135,6 @@ export async function initViteNodeServer (ctx: ViteBuildContext) {
135
135
entryPath = resolve ( ctx . nuxt . options . appDir , 'entry.async' )
136
136
}
137
137
138
- // TODO: Update me
139
138
const host = ctx . nuxt . options . server . host || 'localhost'
140
139
const port = ctx . nuxt . options . server . port || '3000'
141
140
const protocol = ctx . nuxt . options . server . https ? 'https' : 'http'
You can’t perform that action at this time.
0 commit comments