Created
December 7, 2020 07:19
-
-
Save velotiotech/acc419e97b302b71dc33ba34bf3a6b88 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 gateway = new ApolloGateway({ | |
serviceList: [ | |
{ name: 'users', url: 'http://localhost:4001' }, | |
{ name: 'tweets', url: 'http://localhost:4002' }, | |
], | |
}); | |
const server = new ApolloServer({ gateway, subscriptions: false }); | |
server.listen().then(({ url }) => { | |
console.log(`Server ready at url: ${url}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment