Skip to content

Instantly share code, notes, and snippets.

@AgustinCastella
Created April 26, 2021 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AgustinCastella/0ae456ac891b624c26a657b7ef1eb10b to your computer and use it in GitHub Desktop.
Save AgustinCastella/0ae456ac891b624c26a657b7ef1eb10b to your computer and use it in GitHub Desktop.
Create Apollo Server instance with Express
const server = new ApolloServer({ typeDefs, resolvers });
const app = express();
server.applyMiddleware({ app });
app.listen({ port: 4000 }, () =>
console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`)
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment