import {readFile} from 'node:fs/promises'; import {clientFromEnv} from '../client/machine10.mjs'; const client = clientFromEnv(); const program = await readFile(new URL('./build/run-now-q.bin', import.meta.url)); const result = await client.run({ machineId: `starter-run-${Date.now()}`, programBase64: program.toString('base64'), request: { method: 'POST', path: '/starter/run-now', bodyBase64: Buffer.from(JSON.stringify({message: 'hello from Run Now'})).toString('base64') }, permissions: ['q:append', 'q:read'], maxCalls: 2 }); console.log(JSON.stringify(result, null, 2));