mirror of
https://github.com/graphql-hive/console
synced 2026-04-29 10:27:17 +00:00
11 lines
277 B
TypeScript
11 lines
277 B
TypeScript
|
|
import * as http from 'node:http';
|
||
|
|
import * as foo from '@whatwg-node/server';
|
||
|
|
|
||
|
|
const adapter = foo.createServerAdapter(async request => {
|
||
|
|
console.log(JSON.stringify(await request.json(), null, 2));
|
||
|
|
|
||
|
|
return new Response('{}');
|
||
|
|
});
|
||
|
|
|
||
|
|
http.createServer(adapter).listen(9898);
|