Last active
April 20, 2018 10:38
-
-
Save pie6k/352a48c6029dded917115d14d902a1b7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 * as express from 'express'; | |
import * as graphqlHTTP from 'express-graphql'; | |
import { compileSchema } from 'typegql'; | |
import { FirstSchema } from './simpleSchema.ts' | |
const schema = compileSchema(FirstSchema); | |
const app = express(); | |
app.use( | |
'/graphql', | |
graphqlHTTP({ | |
schema, | |
graphiql: true, | |
}), | |
); | |
app.listen(3000, () => { | |
console.log('Api ready on port 3000'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment