4 Install HTML5 development toolchain on your host
6 1. Check out this repository
7 git clone https://github.com/iotbzh/afm-client.git
9 2) Install NodeJs [not used on target]
13 3) Install building tools [bower, gulp, ....]
14 npm install # this install all development tool chain dependencies
15 sudo npm install --global gulp # this is not mandatory but it will make your live simpler
17 4. For livereload functionality [automatic refresh of HTML/CSS]
18 install [livereload Chrome extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei)
21 ### Overload ./app/etc/AppDefaults.js with '.noderc.js'
23 APPNAME : 'AFBclient', // AppName is use as main Angular Module name
24 FRONTEND: "Frontend", // HTML5 frontend [no leading ./]
25 BACKEND : "Backend", // NodeJS Rest API [no leading ./]
26 URLBASE : '/opa/', // HTML basedir when running in production [should end with a /]
27 APIBASE : '/api/', // Api url base dir [should end with a /]
28 DEBUG : 5003, // Node Debug Port [for mock API debug only]
29 DBG_LVL : 5, // Debug Trace Level 0=no trace.
31 module.exports = config;
33 WARNING: in current version Frontend/services/AppConfig.js is not updated automatically
34 you should make sure than your backend config fit with your frontend config.
35 Note: FCS version should have AppConfig.js configurated automatically from GULP, but this is for "tomorrow"
41 http://localhost:4003/opa /* debug mock api base on Backend/RestApi */
43 ### Test with Application server binder
45 # Start AppFramework Binder
46 export MYWORKSPACE=$HOME/Workspace
47 $MYWORKSPACE/afb-daemon/build/afb-daemon --port=1234 --verbose --token=123456789 --rootdir=$MYWORKSPACE/afm-client/dist.dev
49 Point your browser onto: http://localhost:1234/opa
52 - do not forget '/opa' that should match with your config.URLBASE
53 - if you change --token=xxxx do not forget to update ./Frontend/pages/HomeModules.js
54 - Force HTML/OPA reload with F5 after each HTML5/OPA update or new pages may not be loaded.
55 - When reloading HTML/OPA with F5 do not forget that your initial token wont be accepted anymore. You should either restart to clean existing session or cleanup AJB_session cookie.
58 cd $MYWORKSPACE/afm-client
60 scp -r ./dist.pro/* user@mytarget:/rootdir/apfDaemon
67 |---- .noderc.js [Warning: contains private keys should not uploaded in Github]
76 | | |---- _settings.scss
90 | |-- server.js // launcher
91 | |----/ models // mogoose database schemas
92 | |----/ providers // authentication services
93 | |----/ restapis // application APIs