Created
October 23, 2020 12:56
-
-
Save YonatanKra/d62e88df79bbe5dda632d57dbf2163f4 to your computer and use it in GitHub Desktop.
covid19 graphql server
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
const express = require('express'); | |
const graphqlHTTP = require('express-graphql'); | |
const schema = require('./schema'); | |
const app = express(); | |
app.use(express.static('public')); | |
app.use( | |
'/graphql', | |
graphqlHTTP({ | |
schema, | |
graphiql: true, | |
}), | |
); | |
app.listen(8081); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment