Skip to content

ECL Watch Development

Gordon Smith edited this page Jan 24, 2018 · 3 revisions

There are several approaches to creating a development environment for ECL Watch, this page focuses on two of the common approaches

Remote Server / Local Development (no webpack)

Normal development setup with a remote server and local (client) development machine

  • Build + Deploy a HPCC-Platform to a remote server (or VM) via the usual mechanisms.
  • On the local client machine (Windows / OSX / Linux) ensure you have NodeJS 8.x (LTS) installed:
https://nodejs.org/en/
  • Clone the HPCC Platform Sources from GitHub:
git clone https://github.com/hpcc-systems/HPCC-Platform.git
cd HPCC-Platform
git submodule update --init --recursive
  • Navigate to the ECL Watch source folder (esp/src) and install the third party dependencies
cd ./esp/src
npm install
  • Compile the local TypeScript files to JavaScript
npm run compile
  • Configure the target server in lws.config.js:
const debugServerIP = "192.168.3.22";
  • Start the development server:
npm run start:dev
  • Open a web browser and navigate to the development server:
http://localhost:8080/stub.htm?nopack=1

Continuous Integration (with webpack)

This method continuously monitors the source files for changes and rebuilds the production packages as needed. In this example the setup is a single Linux machine used for running a HPCC-Platform instance and developing the ECL Watch sources.

  • Build + Deploy a HPCC Platform to the target Linux machine.
  • On the same machine ensure you have NodeJS 8.x (LTS) installed:
https://nodejs.org/en/
  • Clone the HPCC Platform Sources from GitHub:
git clone https://github.com/hpcc-systems/HPCC-Platform.git
cd HPCC-Platform
git submodule update --init --recursive
  • Navigate to the ECL Watch source folder (esp/src) and install the third party dependencies
cd ./esp/src
npm install
  • Compile the local TypeScript files to JavaScript and create the initial build:
npm run build
  • Delete the current ECL Watch distribution:
sudo rm -rf /opt/HPCCSystems/componentfiles/files/dist/
  • Create a symlink from the local build folder to the ECL Watch distribution (your source path may be different):
sudo ln -s ~/git/HPCC-Platform/esp/src/build/dist /opt/HPCCSystems/componentfiles/files/dist
  • Monitor the local files for changes:
npm run bundle-watch
  • Open the ECL Watch page as normal:
http://192.168.3.22:8010