Skip to content

Instantly share code, notes, and snippets.

@yvesbou
Created February 18, 2022 10:29
Show Gist options
  • Save yvesbou/b5e131217c40c10353d7877f32e6f031 to your computer and use it in GitHub Desktop.
Save yvesbou/b5e131217c40c10353d7877f32e6f031 to your computer and use it in GitHub Desktop.
const server = new ApolloServer({
typeDefs,
resolvers,
context: {models}
});
// port: process.env.PORT yet undefined but we will have this variable
// once we deployed to heroku
server.listen({port: process.env.PORT || 4000}).then(({url}) => {
console.log(`Server is ready at ${url}`);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment