Created
September 19, 2017 13:07
-
-
Save kingisaac95/16a4e29ce1e9268bd4024d430753621f to your computer and use it in GitHub Desktop.
DMS Server v1
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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
// handle graphql request and response based on schema | |
const { graphqlExpress } = require('apollo-server-express'); | |
const schema = require('./schema'); | |
let app = express(); | |
app.use('/graphql', bodyParser.json(), graphqlExpress({ schema })); | |
const PORT = process.env.PORT || 3200; | |
app.listen(PORT, () => { | |
console.log(`DMS app running on port ${PORT}.`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment