Skip to content
Demo app for enterprise ready Mobile Developer Services
Branch: master
Clone or download
Latest commit 10505a3 Apr 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore(deps): update docker docker tag to v17.12.1 Feb 26, 2019
.github fix: issue template Jan 11, 2019
e2e
resources fix: error when run `ioinic cordova prepare ios` (#100) Mar 8, 2019
scripts feat: Pushing example server docker container to Dockerhub (#44) Feb 22, 2019
server Merge branch 'master' into AEROGEAR-8882 Apr 12, 2019
src fix: add note Apr 18, 2019
.gitignore fix: Ignore services file Feb 4, 2019
LICENSE fix: Add package-lock to git ignore Jan 18, 2019
README.adoc add push note (#131) Apr 4, 2019
angular.json fix: Fix icons :crying Jan 25, 2019
config.xml fix: error when run `ioinic cordova prepare ios` (#100) Mar 8, 2019
google-services.json fix: rename package in firebase config to `org.aerogear.ionic.showcase` Feb 22, 2019
ionic.config.json
package.json fix: bump version Apr 18, 2019
renovate.json Update renovate.json (#142) Apr 12, 2019
tsconfig.json TS-Config update Dec 3, 2018
tslint.json Initial version Dec 3, 2018

README.adoc

AeroGear Data Sync Showcase Application

Example application using AeroGear Mobile Services.

Implementation

Implementation includes:

  • Integration with AeroGear Mobile Services

  • Ionic 4 Angular frontend backed by Cordova

  • A Node.js GraphQL Server that implements a sample Tasks workflow

GraphQL Client

The mobile application uses Voyager Client to provide additional offline capabilities on top of Apollo GraphQL.

GraphQL Server

The GraphQL server uses Voyager Server to provide GraphQL capabilities along with security, monitoring and tools to simplify GraphQL API development.

Getting Started

Requirements:

  • Docker

  • Node.js 6.x or above to run server

  • (optional) access to a running OpenShift instance

Running the server

  1. Start the PostgreSQL container

    cd ./server
    docker-compose up -d
  2. Start the server

    npm install
    npm run start
    Note

    If Keycloak integration is enabled on the server, and the Keycloak server is running using self-signed certificate, please make sure set this environment variable before running the server:

    export NODE_TLS_REJECT_UNAUTHORIZED=0

Running the Server on OpenShift (optional)

  1. Log into your OpenShift instance with the oc login command.

  2. Deploy the Server with PostgreSQL

    oc new-app -f server/openshift-template.yml
  3. To deprovision all of the resources from the template, run

    oc delete all -l app=ionic-showcase-server \
    && oc delete secret -l app=ionic-showcase-server \
    && oc delete pvc -l app=ionic-showcase-server

Running the Client

  1. Install Ionic 4

    npm install -g ionic@4
  2. Install dependencies

    npm install
  3. Browse Ionic 4 app

    npm run start
  4. Alternatively - Run as a mobile application in the Android emulator.

    npm run ionic:android
Note
To connect to the local GraphQL server, when the app is running in the Android emulator, change [Client URL](https://github.com/aerogear/ionic-showcase/blob/master/src/app/services/sync/voyager.service.ts#L76) from localhost to 10.0.2.2. Note that Push notifications do not work in an emulator.

OpenShift Integration

To integrate with OpenShift mobile config please paste your configuration into mobile-services.js file

You can’t perform that action at this time.