@newmo/graphql-fake-server
Version:
GraphQL fake server for testing
18 lines (16 loc) • 313 B
text/typescript
import { run } from "./cli.js";
const ret = await run();
if (ret.stdout) {
console.log(ret.stdout);
}
if (ret.stderr) {
console.error(ret.stderr);
}
if (!ret.doNotExit) {
process.exit(ret.exitCode);
}
// Fast exit on SIGTERM
process.on("SIGTERM", () => {
process.exit(0);
});