Sign up for Hasura Newsletter
Loading...

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:

Connect Postgres

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.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin