MCPcopy Create free account
hub / github.com/prisma/prisma-examples / StartServer

Function StartServer

orm/hapi-graphql-sdl-first/src/index.ts:8–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { context } from './context'
7
8async function StartServer() {
9 const apollo = new ApolloServer<BaseContext>({
10 typeDefs,
11 resolvers,
12 })
13
14 await apollo.start()
15
16 const app = new Server({
17 port: 4000,
18 })
19
20 await app.register({
21 plugin: hapiApollo,
22 options: {
23 path: '/graphql',
24 context: async () => (context),
25 apolloServer: apollo,
26 }
27 });
28 await app.start()
29}
30
31StartServer()
32 .then((server) => {

Callers 1

index.tsFile · 0.85

Calls 1

startMethod · 0.65

Tested by

no test coverage detected