Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

hasura/realtime-location-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important: Moved to hasura/graphql-engine

The contents of this repo have been moved to hasura/graphql-engine. Please create all issues and pull requests there.


realtime-location-app

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

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 Postgres and GraphQL Engine on Heroku:

    Deploy to heroku

  • Get the Heroku app URL (say realtime-backend2.herokuapp.com)

  • Clone this repo:

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

  • Goto hasura/ and edit config.yaml:

    endpoint: https://realtime-backend2.herokuapp.com
  • Apply the migrations:

    hasura migrate apply
  • Edit HASURA_GRAPHQL_URL in src/constants.js and set it to the Heroku app URL:

    export const HASURA_GRAPHQL_URL = 'realtime-backend2.herokuapp.com/v1alpha1/graphql';
  • Run the app (go to the root of the repo):

    npm start

Releases

No releases published

Packages

No packages published