Skip to content

Commit 4de612c

Browse files
committed
fix: ok this time I think I have it
1 parent d737557 commit 4de612c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

bin.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@ async function main({_: [cmd], p, d}) {
99
switch (cmd) {
1010
case 'start': {
1111
if (d) require('daemonize-process')()
12-
const cmd = path.join(
13-
__dirname,
14-
'node_modules',
15-
'.bin',
16-
process.platform === 'win32' ? 'micro.cmd' : 'micro'
17-
)
12+
const cmd = require.resolve('micro/bin/micro.js')
1813
const args = [
14+
cmd,
1915
`--listen=tcp://0.0.0.0:${p || 9999}`
2016
]
2117
let server = spawn(
22-
cmd, args,
18+
'node', args,
2319
{
2420
stdio: 'inherit',
25-
windowsHide: true
21+
windowsHide: true,
22+
cwd: __dirname
2623
}
2724
)
2825
fs.writeFileSync(

0 commit comments

Comments
 (0)