update
This commit is contained in:
21
server/test/run-str.ts
Normal file
21
server/test/run-str.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
|
||||
const code = `import { App } from '@kevisual/router';
|
||||
const app = new App();
|
||||
console.log('App initialized:', app.appId);
|
||||
`
|
||||
// const child = Bun.spawn({
|
||||
// cmd: ["bun", "--eval", "console.log('from child process')"],
|
||||
// stdio: ["pipe", "pipe", "inherit"]
|
||||
// });
|
||||
|
||||
const child = Bun.spawn({
|
||||
cmd: ["bun", "--eval", code],
|
||||
env: {},
|
||||
stdio: ["pipe", "pipe", "inherit"]
|
||||
});
|
||||
|
||||
const output = await new Response(child.stdout).text();
|
||||
console.log('Child process output:', output);
|
||||
|
||||
console.log('Child process PID:', child.pid);
|
||||
Reference in New Issue
Block a user