summaryrefslogtreecommitdiffstats
path: root/examples/hybrid-html5/README.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-02 19:47:36 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-02 19:47:36 +0200
commit64ffd7a9f9604805c01f8bb2fd32616c3adf3ec0 (patch)
tree264e2743e509b8d7993bc5550ce6140dfc4b151f /examples/hybrid-html5/README.md
parent6d75b83627114cecd7992bb460f6908268a57967 (diff)
Initial commit
Change-Id: I536251add63ef100b42a67e39a02fef117f2b414 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'examples/hybrid-html5/README.md')
-rw-r--r--examples/hybrid-html5/README.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/hybrid-html5/README.md b/examples/hybrid-html5/README.md
new file mode 100644
index 0000000..f9119a6
--- /dev/null
+++ b/examples/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
+```
+