Skip to content

Instantly share code, notes, and snippets.

@eduardopc
Created December 11, 2020 05:31
Show Gist options
  • Save eduardopc/c8528bc3d131e5583da1a5a3348924e0 to your computer and use it in GitHub Desktop.
Save eduardopc/c8528bc3d131e5583da1a5a3348924e0 to your computer and use it in GitHub Desktop.
import "dotenv/config";
import { GraphQLServer } from "graphql-yoga";
import { resolvers, typeDefs } from './animals';
import DatabaseBootstrap from './database';
const server = new GraphQLServer({ typeDefs, resolvers });
server.start(() => {
new DatabaseBootstrap().bootstrap();
console.log(
`Server is running at http://localhost:4000`
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment