### What is this PR for? This PR is for support flexible port for custom `web application development` and update the structure of README.md document for the support variable. ### What type of PR is it? [ Improvement | Documentation (README.md) ] ### What is the Jira issue? * [ZEPPELIN-2190](https://issues.apache.org/jira/browse/ZEPPELIN-2190) ### How should this be tested? 1. run build - `mvn clean package -DskipTests -pl 'zeppelin-web'` 2. run dev mode with `WEB_PORT` variable port under `zeppelin-web` folder - `WEB_PORT=9999 yarn run dev` 3. connect `localhost:9999` on web browser ### Screenshots (if appropriate) [after]   ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes, README.md of `zeppelin-web` Author: soralee <sora0728@zepl.com> Closes #2113 from soralee/ZEPPELIN-2190 and squashes the following commits:f1faa79[soralee] modify convention and remove if statement799f4ee[soralee] add description (README.md, webpack.config.js)78653a8[soralee] Support custom web development port
2.3 KiB
Zeppelin Web Application
This is Zeppelin's frontend project.
Development Guide
Packaging
If you want to package the zeppelin-web only, simply run this command in this folder.
This will download all the dependencies including node (the binaries in the folder zeppelin-web/node)
$ mvn package
Local Development
It is recommended to install node 6.0.0+ since Zeppelin uses 6.9.1+ (see creationix/nvm)
All build commands are described in package.json
# install required depepdencies and bower packages (only once)
$ npm install -g yarn
$ yarn install
# build zeppelin-web for production
$ yarn run build
# run frontend application only in dev mode (localhost:9000)
# you need to run zeppelin backend instance also
$ yarn run dev
# execute tests
$ yarn run test
Supports the following options with using npm environment variable when running the web development mode.
# if you are using a custom port instead of default(8080),
# you must use the 'SERVER_PORT' variable to run the web application development mode
$ SERVER_PORT=YOUR_ZEPPELIN_PORT yarn run dev
# if you want to use a web dev port instead of default(9000),
# you can use the 'WEB_PORT' variable
$ WEB_PORT=YOUR_WEB_DEV_PORT yarn run dev
Troubleshooting
Git error
In case of the error ECMDERR Failed to execute "git ls-remote --tags --heads git://xxxxx", exit code of #128
change your git config with git config --global url."https://".insteadOf git://
Proxy issues
Try to add to the .bowerrc file the following content:
"proxy" : "http://<host>:<port>",
"https-proxy" : "http://<host>:<port>"
also try to add proxy info to yarn install command:
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>--proxy=http://<host>:<port> --https-proxy=http://<host>:<port></arguments>
</configuration>
</execution>
and retry to build again.
Contribute on Zeppelin Web
If you wish to help us and contribute to Zeppelin WebApplication, please look at the overall project contribution guidelines and the more focused Zeppelin WebApplication's documentation.