Last active
November 6, 2019 05:14
-
-
Save imjakechapman/20615b1bc79c06607241a202ac500694 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloServer } from "apollo-server"; | |
import * as dotenv from "dotenv"; | |
// Process env | |
dotenv.config(); | |
// Apollo-Server Schema | |
import { schema } from "./schema"; | |
// GraphQL Server | |
const server: ApolloServer = new ApolloServer(schema); | |
// Kick off server | |
server.listen(process.env.port || 8080).then(({ url }: any) => { | |
console.log(`🚀 Server ready at ${url}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment