The purpose of this demo is to develop a Mobile Application using the Ionic, Feedhenry & Cordova Hybrid HTML5 Frameworks calling the backend REST services designed for the JBoss Fuse Blog application developed here. The application can run on an iOS/Android Mobile application.
Remark : The application can be started in emulation mode with IoS but not yet with Android
- Nodejs - v0.10.30 -
npm install -g [email protected]
- Grunt
- Ionic - 1.7.7
- Cordova - 5.4.1
- To run this project, open a unix/windows terminal and git clone the project or download the code
- Next move to the mentioned folders hereafter and follow the instructions in order to start the Mobile Client and the Backend server communicating with the Apache Camel REST Services.
- In order to use the nodejs javascript server, we have to install first the javascript packages required
- As the ionic client tool will be used to generate the HTML5 Hybrid code and emulate the iOS or Android Mobile application, then we will specify within the next section how to build and emulate the Mobile environment.
- Move to the
client-ionic
directory and execute these commands - Add the Cordova platform specific config files
rm -rf resources/
rm -rf plugins
rm -rf platforms/
ionic hooks add
ionic platform add ios
ionic platform add browser
- Build HTML5 Mobile hybrid code
ionic build ios
ionic build browser
- Run the nodejs server and emulate the browser or ios
ionic run browser
ionic run ios
Remark : When we use the option local, feedhenry will access the backend server locally using the address passed as parameter to the url
- To run on Android
ionic emulate android
ionic emulate android --target=Samsung-Galaxy-S6
- In a separate terminal of the client-ionic
ionic run browser
and within the browser of the android browser
http://10.0.2.2:8000?url=http://10.0.0.2:8001/#app/articles
- Move to the
backend-service
directory and execute these commands to install the node javascript modules and start the node js server
npm install
npm install grunt
- Run the nodejs server and emulate the browser or ios
grunt serve
Remark : Don't forget to follow the installation procedure here of Rest DSL in Action in order to use the backend services.