Skip to content

Commit 6b11465

Browse files
committed
fix
1 parent 47b0be8 commit 6b11465

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

utils/local.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,31 +254,26 @@ async function run_browser(
254254
process.env.BROWSER = true
255255
process.on("SIGINT", async () => {
256256
console.log("Shutting down microservices")
257-
await Promise.all([
258-
kill_back(process.env.GEODE_PORT),
259-
kill_viewer(process.env.VIEWER_PORT),
260-
])
257+
await Promise.all([kill_back(back_port), kill_viewer(viewer_port)])
261258
console.log("Quitting App...")
262259
process.exit(0)
263260
})
264261

265-
const nuxt_port = await get_available_port()
266-
console.log("nuxt_port", nuxt_port)
267-
268-
process.env.NUXT_PORT = nuxt_port
269262
const nuxt_process = child_process.spawn("npm", ["run", script_name], {
270263
shell: true,
271264
})
272265

273-
return new Promise((resolve, reject) => {
266+
return new Promise((resolve) => {
274267
nuxt_process.stdout.on("data", function (data) {
275268
const output = data.toString()
276269
const portMatch = output.match(
277270
/Accepting\ connections\ at\ http:\/\/localhost:(\d+)/,
278271
)
279272
console.log("Nuxt: ", output)
280273
if (portMatch) {
281-
resolve(portMatch[1])
274+
const nuxt_port = portMatch[1]
275+
process.env.NUXT_PORT = nuxt_port
276+
resolve({ geode_port: back_port, viewer_port, nuxt_port })
282277
return
283278
}
284279
})

0 commit comments

Comments
 (0)