Web application for searching and exploring entity graphs in Elasticsearch indices.
This web application is built primarily with Web Components using the Polymer library. The technology stack also includes Node.js, Express.js, Gulp.js, Elastic Search Client, Elastic.js and many other Bower and NPM javascript modules. The public web components used in this application and others are located in DigElements.
- node.js - download and install node.js
- gulp.js - npm i -g gulp
- bower.js - npm i -g bower
- polyserve - npm i -g polyserve
- web component tester - npm i -g web-component-tester
- elastic search server with ht data index. See elastic.co
- clone this repo
-
cd digapp-ht && npm install && bower install
-
create digapp-ht/server/config/local.env.js with contents that look like:
'use strict'; // Use local.env.js for environment variables that gulp will set when // the server starts locally. // Use for your api keys, secrets, etc. This file should not be tracked by git. // // You will need to set these on the server you deploy to. module.exports = { ELASTIC_CONFIG:'{"host":"http://vinisvr:9200"}', ELASTIC_INDEX:'dhtcat1op', ANNOTATION_INDEX: 'dig-annotations', ANNOTATION_TYPE: 'annotation' };
gulp serve
This outputs an IP address you can use to locally test and another that can be used on devices connected to your network.
To successfully run unit tests, you must have a copy of sample data for the elastic search index that this application will use. These are kept in dig-data
gulp test:local
This runs the unit tests defined in the app/test
directory through web-component-tester.
First update the version in package.json. Then run:
gulp
Build and optimize the current project, ready for deployment. This includes vulcanization, image, script, stylesheet and HTML optimization and minification. The version from package.json will also be available in the user settings dropdown menu (the gear icon in the upper-right corner of each page).
The client code uses Web Component Tester
Read more about using Web Component tester.
Pull requests are welcome. Please fork this repo, then create a topic branch on your forked copy. Ensure that all unit tests are working before and after making modifications on your topic branch. Add necessary unit tests to accompany your feature or bug fix, and then submit a pull request with upstream branch set to the default (master) branch, and downstream branch set to your topic branch on your forked repo.
First update the version in package.json. Then run:
gulp docker
This will build & vulcanize the application, build the docker container (using the version from package.json), and push it to docker hub.