12 lines
451 B
JavaScript
12 lines
451 B
JavaScript
import { spawn } from 'node:child_process'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const vite = fileURLToPath(new URL('../node_modules/vite/bin/vite.js', import.meta.url))
|
|
const child = spawn(process.execPath, [vite, '--host', '127.0.0.1', '--port', '4173'], {
|
|
cwd: new URL('..', import.meta.url),
|
|
env: { ...process.env, REPOPULSE_API_PROXY: 'http://127.0.0.1:8001' },
|
|
stdio: 'inherit',
|
|
})
|
|
|
|
child.on('exit', (code) => process.exit(code ?? 0))
|