Skip to main content


Alosaur - Deno web framework with many decorators
Go to Latest
import { assert } from "../src/deps_test.ts";
export async function startServer(serverPath: string): Promise<Deno.Process> { let process: Deno.Process;
process ={ cmd: [ Deno.execPath(), "run", "-A", "--importmap=imports.json", "--unstable", "--config", "deno.json", serverPath, ], stdout: "piped", stderr: "inherit", }); // Once server is ready it will write to its stdout. assert(process.stdout != null);
// const r = new TextProtoReader(new BufReader(process.stdout as any)); const r = process.stdout.readable.getReader(); let s = await;
// assert(s !== null && s.includes("Server start in")); assert(s !== null);
return Promise.resolve(process);}
export function killServer(process: Deno.Process): void { process.close(); (process.stdout as any)?.close();}