graphql-engine/community/sample-apps/realtime-location-tracking
Sai Krishna Prasad Kandula d7a52b9342 readme: use cloud signup endpoint for "Deploy to Hasura" CTA
https://github.com/hasura/graphql-engine-mono/pull/2142

GitOrigin-RevId: 212d766978841d5609d726f8359586185f3cbb59
2021-08-19 07:03:05 +00:00
..
hasura community: fix sample apps metadata for v3 config 2021-08-19 03:46:59 +00:00
public add github workflow to compress new images in PRs 2021-03-10 20:55:02 +00:00
src add github workflow to compress new images in PRs 2021-03-10 20:55:02 +00:00
.env refactor community content and folder structure (#1353) 2019-01-17 15:57:28 +05:30
.gitignore refactor community content and folder structure (#1353) 2019-01-17 15:57:28 +05:30
Dockerfile refactor community content and folder structure (#1353) 2019-01-17 15:57:28 +05:30
package.json refactor community content and folder structure (#1353) 2019-01-17 15:57:28 +05:30
README.md readme: use cloud signup endpoint for "Deploy to Hasura" CTA 2021-08-19 07:03:05 +00:00

realtime-location-app

A demo application to showcase real-time capabilities of Hasura GraphQL Engine.

Edit realtime-location-tracking

The Realtime location application is built using React and is powered by Hasura GraphQL Engine over Postgres. It has an interface for users to track location of a vehicle using Hasura live queries, in real-time.

The application makes use of Hasura GraphQL Engine's real-time capabilities using subscription. There is no backend code involved. The application is hosted on GitHub pages and the Postgres+GraphQL Engine is running on Postgres.

Running the app yourself

  • Deploy GraphQL Engine on Hasura Cloud and setup PostgreSQL via Heroku:

    Deploy to Hasura Cloud

  • Get the Hasura app URL (say realtime-backend2.hasura.app)

  • Clone this repo:

    git clone https://github.com/hasura/graphql-engine
    cd graphql-engine/community/sample-apps/realtime-location-tracking
    
  • Install Hasura CLI

  • Goto hasura/ and edit config.yaml:

    endpoint: https://realtime-backend2.hasura.app
    
  • Apply the migrations:

    hasura metadata apply
    hasura migrate apply
    hasura metadata reload
    
  • Edit HASURA_GRAPHQL_ENGINE_HOSTNAME in src/constants.js and set it to the Hasura app URL:

    const HASURA_GRAPHQL_ENGINE_HOSTNAME = 'realtime-backend2.hasura.app/v1/graphql';
    
  • Run the app (go to the root of the repo):

    npm start