Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created October 8, 2020 10:57
Show Gist options
  • Save velotiotech/7ad5045aa37cac15bf800daa0d5daa94 to your computer and use it in GitHub Desktop.
Save velotiotech/7ad5045aa37cac15bf800daa0d5daa94 to your computer and use it in GitHub Desktop.
import {ApolloServer} from 'apollo-server'
import { resolvers } from './src/resolvers';
import { buildSchema } from 'type-graphql';
const schema = buildSchema({
resolvers,
});
const server = new ApolloServer({ schema, resolvers });
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment