1 ### Sample client application for Application Framework Binder
3 ![AFB-Client screenshot](http://iot.bzh/images/afm-client.jpg)
5 _(Application Framework Binder can be found on https://github.com/iotbzh/afb-daemon)_
9 Install HTML5 development toolchain on your host
11 1. Check out this repository
12 git clone https://github.com/iotbzh/afm-client.git
14 2) Install NodeJs [not used on target]
18 3) Install building tools [bower, gulp, ....]
19 npm install # this install all development tool chain dependencies
20 sudo npm install --global gulp # this is not mandatory but it will make your live simpler
23 ### Overload ./app/etc/AppDefaults.js with '.noderc.js'
25 APPNAME : 'AFBclient', // AppName is use as main Angular Module name
26 FRONTEND: "Frontend", // HTML5 frontend [no leading ./]
27 URLBASE : '/opa/', // HTML basedir when running in production [should end with a /]
28 APIBASE : '/api/', // Api url base dir [should end with a /]
30 module.exports = config;
32 WARNING: in current development version Frontend/services/AppConfig.js is not updated automatically
33 you should manually assert that backend config is in sync with frontend config.
38 rsync -az dist.dev xxxx@agl-target:afm-client
40 ### Test with Application
42 # Start AppFramework Binder
43 export MYWORKSPACE=$HOME/Workspace
44 $MYWORKSPACE/afb-daemon/build/afb-daemon --port=1234 --verbose --token=123456789 --rootdir=$MYWORKSPACE/afm-client/dist.dev
46 Point your browser onto: http://agl-target:1234/opa
49 - do not forget '/opa' that should match with your config.URLBASE
50 - if you change --token=xxxx do not forget to update ./Frontend/pages/HomeModules.js
51 - Force HTML/OPA reload with F5 after each HTML5/OPA update or new pages may not be loaded.
52 - When reloading HTML/OPA with F5 do not forget that your initial token wont be accepted anymore. You should either:
53 + restart to clean existing session
54 + cleanup AJB_session cookie
55 + start an anonymous web page to get a fresh and clean environment.
58 cd $MYWORKSPACE/afm-client
60 scp -r ./dist.prod/* user@mytarget:/rootdir/afm-client
61 ssh user@mytarget "afb-daemon --port=3001 --token='' --rootdir=/rootdir/afm-client"
62 http://mytarget:3001/opa
64 ### Directory structure
78 | | |---- _settings.scss