<commit_before>Vertice Gateway
================

API server for "[Megam vertice](https://www.megam.io)". The API server protectes the RESTful resources using [HMAC](http://www.ietf.org/rfc/rfc2104.txt) based authorization.

## Requirements


1. [SBT 0.13.12 >](https://scala-sbt.org)
2. [NSQ 0.3.x  ](http://nsq.io)
3. [OpenJDK 8.0](http://openjdk.java.net/install/index.html)
4. [Cassandra 3 +](http://apache.cassandra.org)


## Compile from source

You'll need `sbt` build tool. and `OpenJDK8.0`

### Fork

After you have forked a copy of https://github.com/megamsys/vertice_gateway.git

### Steps

```

* git clone https://github.com/<your_github_id>/vertice_gateway.git

* cd vertice_gateway

* sbt

* clean

* compile


```

## Running

[Install Cassandra](http://cassandra.apache.org/download/)

[Install and start NSQ.io](http://nsq.io/deployment/installing.html)


## Cassandra keyspace setup

```
* cd vertice_gateway/conf

* cqlsh -f vertice.cql

* cqlsh -f upgrade_1.5.cql

* cqlsh -f marketplaces.cql


```

```
* cd vertice_gateway

* sbt

* clean

* compile

* run

```


## Type the url `http://localhost:9000`

You'll see this in your browser.

```json
{<commit_msg>Updated README with pic<commit_after>Vertice Gateway
================

API server for "[Megam vertice](https://www.megam.io)". The API server protectes the RESTful resources using [HMAC](http://www.ietf.org/rfc/rfc2104.txt) based authorization.

## Requirements


1. [SBT 0.13.12 >](https://scala-sbt.org)
2. [NSQ 0.3.x  ](http://nsq.io)
3. [OpenJDK 8.0](http://openjdk.java.net/install/index.html)
4. [Cassandra 3 +](http://apache.cassandra.org)


## Compile from source

You'll need `sbt` build tool. and `OpenJDK8.0`

### Fork

After you have forked a copy of https://github.com/megamsys/vertice_gateway.git

### Steps

```

* git clone https://github.com/<your_github_id>/vertice_gateway.git

* cd vertice_gateway

* sbt

* clean

* compile


```

## Running

[Install Cassandra](http://cassandra.apache.org/download/)

[Install and start NSQ.io](http://nsq.io/deployment/installing.html)


## Setup cassandra keyspace

```
* cd vertice_gateway/conf

* cqlsh -f vertice.cql

* cqlsh -f upgrade_1.5.cql

* cqlsh -f marketplaces.cql


```

## Start Vertice Gateway

```
* cd vertice_gateway

* sbt

* clean

* compile

* run

```

![Gateway](https://github.com/megamsys/vertice_gateway/blob/1.5/public/images/vertice_gateway.png)

## Type the url `http://localhost:9000`

You'll see this in your browser.

```json
{
{'fraction_non_alphanumeric': 0.17366946778711484, 'fraction_numerical': 0.021608643457382955, 'mean_word_length': 3.8638132295719845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 9, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4275397', 'n_tokens_mistral': 1045, 'n_tokens_neox': 967, 'n_words': 207}