Connect Postgres to Hasura
Connecting an application database is very simple with Hasura. Hasura
supports connectors to most popular databases. Head to the Data
tab and click on Connect Database
.
Launch the Hasura Console - our GUI for managing our Hasura instance - by navigating to:
http://localhost:8080/console
.
Select Postgres from the list of connectors and click Connect Existing Database
:
We'll give our database the name of HRTool
and provide the path as an environment variable using
HASURA_GRAPHQL_METADATA_DATABASE_URL
. In our docker-compose.yaml
file, we have already set this environment variable
to the connection string of the Postgres container we're running.
Finish by clicking Connect Database
.
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs