There was an error while loading. Please reload this page.
1 parent e65905b commit 6330c44Copy full SHA for 6330c44
src/index.ts
@@ -1,15 +1,21 @@
1
-import {app} from '@getcronit/pylon'
2
-import {serve} from '@hono/node-server'
+import { app } from "@getcronit/pylon";
+import { serve } from "@hono/node-server";
3
4
export const graphql = {
5
Query: {
6
hello: () => {
7
- return 'Hello, world!'
8
- }
+ return "Hello, world!";
+ },
9
},
10
- Mutation: {}
11
-}
+ Mutation: {},
+};
12
13
-serve(app, info => {
14
- console.log(`Server running at ${info.port}`)
15
-})
+serve(
+ {
+ fetch: app.fetch,
16
+ port: process.env.PORT ? parseInt(process.env.PORT) : 4000,
17
18
+ (info) => {
19
+ console.log(`Server running at ${info.port}`);
20
+ }
21
+);
0 commit comments