From 5a87b82700a736e7c443023399da3d2a31098895 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 4 May 2017 13:59:00 +0200 Subject: Rename to more meaningful name directories Change-Id: Ib3990308c1f2358b3e330cd0068719098c4dab56 Signed-off-by: Romain Forlot --- templates/hybrid-html5/README.md | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 templates/hybrid-html5/README.md (limited to 'templates/hybrid-html5/README.md') diff --git a/templates/hybrid-html5/README.md b/templates/hybrid-html5/README.md new file mode 100644 index 0000000..f9119a6 --- /dev/null +++ b/templates/hybrid-html5/README.md @@ -0,0 +1,57 @@ +# Template Hybrid HTML5 Application for Application Framework Binder + +## Setup + +Install HTML5 development toolchain on your host + +``` +$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - +$ sudo apt-get install nodejs +$ sudo npm install --global gulp + +``` + +Then install NodeJS dependencies + +``` +$ cd html5 # or the project directory +$ npm install +``` + +## Overload ./app/etc/AppDefaults.js with '.noderc.js' + +``` + var config= { + APPNAME : 'xxxxxx-hybrid-html5', // AppName is use as main Angular Module name + FRONTEND: "Frontend", // HTML5 frontend [no leading ./] + BACKEND : "Backend", // NodeJS Rest API [no leading ./] + URLBASE : '/opa/', // HTML basedir when running in production [should end with a /] + APIBASE : '/api/', // Api url base dir [should end with a /] + }; + module.exports = config; +``` + +WARNING: in current development version Frontend/services/AppConfig.js is not updated automatically +you should manually assert that backend config is in sync with frontend config. + +## Build widget + +``` +$ mkdir build && cd build +$ cmake .. +$ make +``` + +This should give a .wgt file ready to be deployed on the target. + +## Deploy application package + +Run: + +``` +$ scp *.wgt root@$BOARDIP:~/ +$ ssh root@$BOARDIP +# afm-util install xxxxxx-hybrid-html5.wgt +# afm-util start xxxxxx-hybrid-html5@0.1 +``` + -- cgit 1.2.3-korg