Running a Data Sync app on Red Hat Managed Integration
Deploying your Data Sync server application
-
You have a Data Sync server application working locally
-
Log in to the Solution Explorer.
-
Navigate to the OpenShift console.
-
Click Create Project.
-
Enter the details for your application, when prompted.
-
Navigate to the Project Overview screen.
-
Search for the Data Sync App in the Service Catalog.
-
In the Configuration section:
-
Enter the Git URL for the application repository.
To use a private repository, see Creating New Applications. -
Enter information for the required fields (indicated by * ).
-
Complete any optional fields, if necessary.
-
-
Complete the Wizard to start provisioning the Data Sync server application.
-
Wait for the service to display a ready status.
-
On the Project Overview screen, use the application URL displayed in the top right corner to verify your application is available.
Connecting the Data Sync client to your Data Sync server application
-
You have deployed your Data Sync server application.
-
You have set up a web project that supports ES6. For example:
-
Using Create React App
-
Using Ionic Getting Started
-
-
Get the hostname of the Data Sync Server application.
-
In your teriminal, run the command:
$ oc get route <data-sync-application-name>
-
Verify the output as:
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD <sync-server-application-name> <sync-server-hostname> data-sync-app <all> None
-
Record the value for
<sync-server-hostname>
.
-
-
Make sure the
@aerogear/voyager-client
,graphql
, andgraphql-tag
libraries are added to your project. If necessary, add them by using the following commands:npm install @aerogear/voyager-client npm install graphql npm install graphql-tag
-
In your project source code, import and configure the client using the server hostname.
const config = { httpUrl: 'http://<sync-server-hostname>/graphql', wsUrl: 'ws://<sync-server-hostname>/graphql' }
The client is now ready to make queries and mutations to the Data Sync server application.