Hasura under your roof
This blogpost is about setting up the Hasura Local Development Environment.
But before any of that, you need to understand what Hasura is, what it does and how it runs.
I find it hard to describe all of this using simple terms.
Hasura is a batteries included platform for building and deploying powerful backends. Instant APIs for data, auth & file handling (powered by Postgres). Hasura helps you deploy your custom code written in any language/framework. Runs anywhere: your laptop, your VM, your cluster on the cloud.
Remember when you were developing an app, and had to install database drivers and were struggling with DB connections? Or when you had to embed queries in your programming language? Or the time, when you had to sift through multiple records looking for existing usernames? Fear not! Hasura to the rescue!
So, essentially what Hasura does is, take care of all these and much more.
To set up the local development, do the following
- Install Virtual Box — Your system should have at least 4GB of RAM and must be a 64 GB Windows system
- Download hasuractl and add it to your path
- Create an account on dashboard.hasura.io
Open Git Bash and run hasuractl login
and login using the credentials from the previous step.
After successful login, run hasuractl local start
The first time you run this command, approximately 1.5GB of docker images will be downloaded and might take a lot of time depending on your Internet connection. Patience is key.
Once your machine has been started, the URL for your project appears as in this image.
Pods for the different services are created and started. Hasuractl has been started and the console will be accessible only when all the pods are up and running.
The page on console.c100.hasura.me looks like this
To stop your machine, run hasuractl local stop