Created
November 12, 2019 13:31
-
-
Save erebus1/70d675be8002226ba969f7817ecc6340 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 {ApolloGateway} from '@apollo/gateway' | |
const monolith_url: string = 'http://monolith:5000/graphql'; | |
const filemanager_url: string = 'http://filemanager:5000/graphql'; | |
const gateway = new ApolloGateway({ | |
serviceList: [ | |
{ name: 'monolith', url: monolith_url }, | |
{ name: 'filemanager', url: filemanager_url }, | |
], | |
}); | |
const server = new ApolloServer({ | |
gateway, | |
subscriptions: false | |
}); | |
server.listen(3000).then(({ url }) => { | |
console.log(`🚀 Server ready at ${url}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment