<commit_before>treeherder-ui
=============


Local Development: Running the web server
-----------------------------------------

-----------------------

You can run the webserver locally.  For now, static data is loaded for testing
and development.


### Requirements

* [node.js](http://nodejs.org/download/)

### Execution

    cd webapp
    ./scripts/web-server.js


### Endpoints

Once the server is running, you can nav to:

* [Jobs list](http://localhost:8000/app/index.html?tree=Try#/jobs)
* [Log Viewer](http://localhost:8000/app/logviewer.html)


Running the unit tests
----------------------

-----------------------

The unit tests run with [Karma](http://karma-runner.github.io/0.8/config/configuration-file.html).


### Requirements

* [node.js](http://nodejs.org/download/)
* karma: ``sudo npm install -g karma``


### Execution

    cd webapp
    ./scripts/test.sh<commit_msg>added conf instructions to readme<commit_after>treeherder-ui
=============


Local Development: Running the web server
-----------------------------------------

-----------------------

You can run the webserver locally.  For now, static data is loaded for testing
and development.


### Requirements

* [node.js](http://nodejs.org/download/)

### Execution

    cd webapp
    ./scripts/web-server.js


### Endpoints

Once the server is running, you can nav to:

* [Jobs list](http://localhost:8000/app/index.html?tree=Try#/jobs)
* [Log Viewer](http://localhost:8000/app/logviewer.html)


Running the unit tests
----------------------

-----------------------

The unit tests run with [Karma](http://karma-runner.github.io/0.8/config/configuration-file.html).


### Requirements

* [node.js](http://nodejs.org/download/)
* karma: ``sudo npm install -g karma``


### Execution

    cd webapp
    ./scripts/test.sh


Configuration
-------------

-------------

You can either run the treeherder service locally, or use a remote server.
This setting is specified in this file:

    webapp/app/js/config/local.conf.js

A sample copy of this file is located here:

    webapp/app/js/config/sample.local.conf.js

Copy the sample file to ``local.conf.js`` and make your custom settings.
{'fraction_non_alphanumeric': 0.23653934652554073, 'fraction_numerical': 0.009203865623561895, 'mean_word_length': 2.2889561270801817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4457784', 'n_tokens_mistral': 673, 'n_tokens_neox': 627, 'n_words': 176}