How to set up a powerful API with GraphQL, Koa, and MongoDB — deploying to production

Trevor-Indrek Lasn
5 min readJun 14, 2019

Our GraphQL runs smoothly locally, but what if we want to share it with the world?

P.S: This is a series where I explain how to set up GraphQL from scratch and go to production. Check out the previous chapter if you haven’t.

In order to make our graphQL API available to the public, we’ll need to deploy it on a production server. I chose Heroku for its simplicity.

Head over to Heroku, create a user if you haven’t, and create a new project. We don’t have to pay anything for our demo.

Head over to the deploy tab and sync the Heroku with Github. The easiest way is to deploy via our Github repository.

--

--