<commit_before># Getting started

Build the project using [Apache Maven] (http://maven.apache.org/):
```
mvn clean install
```

Change the working directory to `server` and start the embedded Jetty web server:
```
mvn jetty:run
```

Congratulations! You now have an openscoring web service running at [localhost:8080] (http://localhost:8080/openscoring/)

# REST API

### PUT - Deploy a model

Deploy the contents of the PMML file `DecisionTreeIris.pmml` as a model `DecisionTreeIris`:<commit_msg>Added deployment instructions<commit_after># Getting started

##### Build and installation

Get the source code from the project page. Enter the root directory and build using [Apache Maven] (http://maven.apache.org/):
```
mvn clean install
```

##### Running in Maven mode (test)

Change the working directory to `server` and start the embedded Jetty web server:
```
mvn jetty:run
```

This will start the openscoring web service at [localhost:8080] (http://localhost:8080/openscoring/)

##### Running in standalone mode (production)

The deployable WAR file `server-1.0-SNAPSHOT.war` is located in build directory `server/target`. Among other deployment options, this file can be directly executed using Jetty Runner.

Download the latest version of Jetty Runner from the [Maven Central Repository] (http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/). Currently, this is the version `9.0.3.v20130506`. Execute the Jetty Runner JAR file by first specifying the web application context path `/openscoring` and second the name of the WAR file:
```
java -jar jetty-runner-9.0.3.v20130506.jar --path /openscoring server-1.0-SNAPSHOT.war
```

Again, this will start the openscoring web service at [localhost:8080] (http://localhost:8080/openscoring).

Please see the [Jetty Runner documentation] (http://www.eclipse.org/jetty/documentation/current/jetty-runner.html) for more configuration options such as using the secure HTTPS connector.

# REST API

### PUT - Deploy a model

Deploy the contents of the PMML file `DecisionTreeIris.pmml` as a model `DecisionTreeIris`:
{'fraction_non_alphanumeric': 0.10361445783132531, 'fraction_numerical': 0.02506024096385542, 'mean_word_length': 4.864406779661017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1805171', 'n_tokens_mistral': 661, 'n_tokens_neox': 607, 'n_words': 240}