1 # Template HTML5 Application for Application Framework Binder
5 Install HTML5 development toolchain on your host
8 $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
9 $ sudo apt-get install nodejs
10 $ sudo npm install --global gulp
14 Then install NodeJS dependencies
17 $ cd html5 # or the project directory
21 ## Overload ./app/etc/AppDefaults.js with '.noderc.js'
25 APPNAME : 'xxxxxx-html5', // AppName is use as main Angular Module name
26 FRONTEND: "Frontend", // HTML5 frontend [no leading ./]
27 BACKEND : "Backend", // NodeJS Rest API [no leading ./]
28 URLBASE : '/opa/', // HTML basedir when running in production [should end with a /]
29 APIBASE : '/api/', // Api url base dir [should end with a /]
31 module.exports = config;
34 WARNING: in current development version Frontend/services/AppConfig.js is not updated automatically
35 you should manually assert that backend config is in sync with frontend config.
37 ## Development build and deployment (development phase)
42 $ BOARDIP=1.2.3.4 # change by your board IP address
43 $ rsync -Pav dist.dev/ root@$BOARDIP:xxxxxx-html5-dev/
48 Start AppFramework Binder:
52 # afb-daemon --port=1234 --verbose --token=123456789 --rootdir=~/xxxxxx-html5-dev
55 Point your browser onto: http://$BOARDIP:1234/opa?token=123456789
58 - do not forget '/opa' that should match with your config.URLBASE
59 - if you change --token=xxxx do not forget to update ./Frontend/pages/HomeModules.js
60 - Force HTML/OPA reload with F5 after each HTML5/OPA update or new pages may not be loaded.
61 - When reloading HTML/OPA with F5 do not forget that your initial token wont be accepted anymore. You should either:
62 + restart to clean existing session
63 + cleanup AJB_session cookie
64 + start an anonymous web page to get a fresh and clean environment.
66 ## Create application package and install on target
74 This should produce a .wgt file in the current directory. You can then install the widget file onto the target and run the application using application framework utilities:
77 $ scp *.wgt root@$BOARDIP:~/
79 # afm-util install xxxxxx-html5.wgt
80 # afm-util start xxxxxx-html5@0.1
83 ## Directory structure
97 | | |---- _settings.scss