This Template App is intended to work with the Drag & Drop Apps feature in the Red Hat Mobile Application Platform.
This Template App builds the appforms-project-client Template App.
It is based on Backbone and uses the $fh.forms.backbone SDK to render forms into the app.
To build:
grunt
Produces a dist folder and dist-dev folder.
- The dist folder contains the minified version of the template app.
This Client App makes use of Feedhenry JS SDK. Specifically
- The Backbone Forms SDK.
- The Core Forms SDK.
The Client App can be run locally using the following commands in the Client App directory:
npm install
.grunt serve
.
When you want to change either the Backbone or Core forms SDK, it is easier to symlink the Backbone Forms SDK and Core Forms SDK directly into you local directory.
- Clone the source code for the Client App. (Fork This Repo)
- Clone the Feedhenry JS SDK locally.
- Run
grunt build
on the fh-js-sdk to build the required SDK files. - Symlink
dist/feedhenry-forms.js
towww/feedhenry.js
. - Symlink
dist/appForms-backbone.js
towww/lib/appform-backbone.js
. - Run your app locally. When ever a change is made to the js-sdk, run
grunt build
again to update the symlinks and refresh the app. The symlinks will allow the changes to be reflected immediately.
It is possible to run the Hello World Cloud App locally and have the locally running Cloud App get forms/make submissions from the relevant mbaas.
- Create a Hello World Cloud App in the Studio.
- Deploy the Cloud App to an environment.
- Once successful, the following environment variables are required. These can be found in the Environment Variables section of the Cloud App:
- FH_APPNAME
- FH_DOMAIN
- FH_ENV
- FH_INSTANCE
- FH_MBAAS_ENV_ACCESS_KEY
- FH_MBAAS_HOST
- FH_MBAAS_PROTOCOL
- FH_WIDGET
- FH_APP_API_KEY
- Place the Environment Variables in the
Gruntfile.js
file of your local Cloud App in theenv.local
section of the config. - In the local Cloud App, run
grunt serve:local
to initialise the Cloud App.
This client app already has the correct structure to be imported directly into the RHMAP Studio. Simply follow the App Import Guide.