We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11fc70d commit 8821751Copy full SHA for 8821751
example/node/package.json
@@ -0,0 +1,9 @@
1
+{
2
+ "name": "node",
3
+ "private": true,
4
+ "license": "MIT",
5
+ "dependencies": {
6
+ "express": "^5.1.0",
7
+ "json-graphql-server": "../../"
8
+ }
9
+}
example/node/server.ts
@@ -0,0 +1,11 @@
+import express from 'express';
+import jsonGraphqlExpress, { getPlainSchema } from 'json-graphql-server/node';
+import data from '../data.cjs'
+
+const PORT = 3000;
+const app = express();
+const plainSchema = getPlainSchema(data);
10
+app.use('/graphql', jsonGraphqlExpress(data));
11
+app.listen(PORT);
0 commit comments