mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com> Co-authored-by: Dotan Simha <dotansimha@gmail.com> Co-authored-by: Denis Badurina <denis@denelop.com>
10 lines
277 B
TypeScript
10 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);
|