4 Install HTML5 development toolchain on your host
6 1. Check out this repository
7 git clone https://github.com/iotbzh/afb-client-sample.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 ./etc/Defaults.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 : 4001, // 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/ConfigApp.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 ConfigApp.js configurated automatically from GULP, but this is for "tomorrow"
41 http://localhost:3001/opa /* debug mock api base on Backend/RestApi */
43 ### Test with Application server binder [you may safely run gulp 'watch-dev' + 'afb-daemon' simultaneously]
44 export MYWORKSPACE=$HOME/Workspace
45 $MYWORKSPACE/afb-daemon/build/afb-daemon --port=1234 --verbose --token=123456789 --rootdir=$MYWORKSPACE/afb-client/dist.dev
46 http://localhost: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 restart to clean existing session or cleanup AJB_session cookie.
55 cd $MYWORKSPACE/afb-client
57 scp -r ./dist.pro/* user@mytarget:/rootdir/apfDaemon
64 |---- .noderc.js [Warning: contains private keys should not uploaded in Github]
73 | | |---- _settings.scss
87 | |-- server.js // launcher
88 | |----/ models // mogoose database schemas
89 | |----/ providers // authentication services
90 | |----/ restapis // application APIs