It has now been 3 years since Facebook announced the arrival of GraphQL. Since then, the use of this query language has grown exponentially. There were more than 700,000 downloads in June 2018 (source: npm). This week, the Numendo editorial team invites you to discover Hasura: an open-source product capable of giving you GraphQL APIs on new or existing Postgres applications.
How do you create a server with Hasura?
Installation via Heroku
The only prerequisite for this step is to have access to the free tier of Heroku Postgres. Once that is done, you simply need to go to Hasura’s official website, click the “Deploy to Heroku” button, log in to your Heroku account, write the name of your application and finally click the deploy app button — and that’s it!“
Self-hosted installation via Docker
While using Heroku works for creating your applications via a cloud, you can also install Hasura self-hosted using Docker. To do this, you simply need to enter the following command in your terminal if you are on Mac: curl -L <https://cli.hasura.io/install.sh> | bash, or else download an installer from Hasura’s official website if you are on Windows.
In order to make installing Hasura on Heroku easier, here is an explanatory video showing you how to proceed step by step:
A command interface ideal for developing your applications
Once your server is installed, you can finally start coding! You will have access to a very complete interface delivered with an API explorer, as well as a web administration interface for PostgreSQL. But what makes Hasura strong is that you can use GraphQL on already existing Postgres applications! To do this, you simply need to link your Postgres account containing your applications to the Hasura interface, and the GraphQL APIs are yours!
Another advantage is that Hasura is not very demanding on RAM: on a Heroku server, it consumes only 50 MB of RAM while handling more than 1,000 requests per second.
Today, it can only be installed on Heroku Postgres or locally on your computer. But its creators are adamant: they intend to make the product much more powerful, even if that means running it on Amazon, Google or Microsoft servers.
So we can say that the small Indian startup that is Hasura is trying to take on the giants of the web!
If you found this article interesting, do share it on social networks and follow our blog.