Skip to content

Commit

Permalink
refactor: improve code formatting and update server initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn committed Dec 17, 2024
1 parent e65905b commit 6330c44
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import {app} from '@getcronit/pylon'
import {serve} from '@hono/node-server'
import { app } from "@getcronit/pylon";
import { serve } from "@hono/node-server";

export const graphql = {
Query: {
hello: () => {
return 'Hello, world!'
}
return "Hello, world!";
},
},
Mutation: {}
}
Mutation: {},
};

serve(app, info => {
console.log(`Server running at ${info.port}`)
})
serve(
{
fetch: app.fetch,
port: process.env.PORT ? parseInt(process.env.PORT) : 4000,
},
(info) => {
console.log(`Server running at ${info.port}`);
}
);

0 comments on commit 6330c44

Please sign in to comment.