Setup

Prerequisites

  • Running Core Instance.

  • Setup environment variables:

    MAPBOX_TOKEN=${mapbox_token}
    SERVER_URL=${server_url}
    TYPES_URL=${types_url}
    • Mapbox Token: Acquire access Token

    • Server Url: Core instance url

      Example: https://gissy-graphql.herokuapp.com/.

    • Types Url: JSON file url.

      Example: https://gissy-graphql.herokuapp.com/types.

      Note that the Core instance auto-generating types in /types path.

      // Types JSON example
      {
      "types": {
      "Node": {
      "fields": [
      {
      "name": "id",
      "type": "ID"
      },
      ...
      ],
      "typeName": "ObjectTypeDefinition"
      },
      "Edge": {
      "fields": [
      {
      "name": "bikeID",
      "type": "String"
      },
      ...
      ],
      ...
      }
      },
      ...
      }

Development

  • Setup environment variables within .env.development
# Production
yarn develop
# Components
yarn storybook

Deployment

  • Setup environment variables within .env.production
# Application build
yarn build
# Storybook Build
yarn build-storybook
# Run application deployment
yarn serve
  • Serve public folder for the Gissy-Dashboard instance.
  • Serve storybook-static folder for storybook instance.