Note: This page refers to the legacy GUI, not GUI2. See Appendix I - GUI2 Development instead
- NodeJS & NPM
UI Development server uses a special `harmony_destructuring` flag that works well with node versions > 5.x
For node version >= 6, you may want to use `–harmony_destructuring_bind` instead.
Disabling JS minification
From ONOS 1.10 onwards, JS & CSS files will be minified for better performance. However this minification would prevent the file changes getting picked up by development server.
So make sure you comment out 40th line in `tools/gui/gulp-tasks/bundles/bundle-js/index.js` before attempting to use this.
Installing NodeJS 5.x from tar.gz option:
Though there are several versions of NodeJS and several ways to install NodeJS, installing from pre-built tar.gz package is the most efficient way.
- Download Node 5.x version using wget
- Install NodeJS binary in /usr/local as follows
- Verify installation
Installing & Starting Development Server:
Enter `web/gui/src/main/webapp/` folder
Run `npm install` to install required dependency
Run `npm start` to open start the development environment
In the console you should see something like:
Loading files from external applications
The UI development environment provide the ability to serve UI files from an external forlder that can be specified with:
`ONOS_EXTERNAL_APP_DIRS="appName:path-to-the-first-folder" npm start`
`ONOS_EXTERNAL_APP_DIRS="sampleCustom:../../meow/sample/meowster-sample/" npm start`
Note that ONOS_EXTERNAL_APP_DIRS is an environment variable,so it can be set with