Files
templates/web/other/graphql-modules-yoga-prisma-starter/src/main.ts

15 lines
437 B
TypeScript

import { createServer } from "node:http";
import { useGraphQLModules } from "@envelop/graphql-modules";
import { createYoga } from "graphql-yoga";
import { application } from "./modules";
function main() {
const yoga = createYoga({ plugins: [useGraphQLModules(application)] });
const server = createServer(yoga);
server.listen(4000, () => {
console.info("Server is running on http://localhost:4000/graphql");
});
}
main();