<commit_before>## HDX Monitor Datastore
DataStore micro-service for the HDX Monitor application. This service is designed to run as a `Docker` container. See the `Dockerfile` for instructions on how to run it.

[![Build Status](https://travis-ci.org/luiscape/hdx-monitor-datastore.svg)](https://travis-ci.org/luiscape/hdx-monitor-datastore) [![Coverage Status](https://coveralls.io/repos/luiscape/hdx-monitor-datastore/badge.svg?branch=master&service=github)](https://coveralls.io/github/luiscape/hdx-monitor-datastore?branch=master)

### Creating DataStores
By default, all datastores are created using an all-text schema. There are three API endpoints useful for making DataStores:

* /show/[RESOURCE_ID]
* /create/[RESOURCE_ID]
* /delete/[RESOURCE_ID]

The first will display metadata from the resource at hand. The second will create a DataStore. You should see a success (or failure) message when the process is complete.


### Secrets
Secrets are kept in the [`/config`](/config) directory. It should be a JavaScript file containing the following:

```javascript
// expose our config directly to our application using module.exports
module.exports = {

    'CkanInstance': 'https://data.hdx.rwlabs.org/',
    'ApiKey': 'XXXXXXX'

}
```

For now, that is how the API key is used to create datastores.

### Coding Standard
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
<commit_msg>improving readme<commit_after>## HDX Monitor Datastore
DataStore micro-service for the HDX Monitor application. This service is designed to run as a `Docker` container. See the `Dockerfile` for instructions on how to run it.

[![Build Status](https://travis-ci.org/luiscape/hdx-monitor-datastore.svg)](https://travis-ci.org/luiscape/hdx-monitor-datastore) [![Coverage Status](https://coveralls.io/repos/luiscape/hdx-monitor-datastore/badge.svg?branch=master&service=github)](https://coveralls.io/github/luiscape/hdx-monitor-datastore?branch=master)

### Creating DataStores
By default, all datastores are created using an all-text schema. There are three API endpoints useful for making DataStores:

* /show/[RESOURCE_ID]
* /create/[RESOURCE_ID]
* /delete/[RESOURCE_ID]

The first will display metadata from the resource at hand. The second will create a DataStore. You should see a success (or failure) message when the process is complete.


### Secrets
Secrets are passed as environment variables. For now, a default API key is used to create DataStores. It can be set as `DEFAULT_API_KEY` when creating the Docker container.

### Coding Standard
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

{'fraction_non_alphanumeric': 0.11797133406835722, 'fraction_numerical': 0.0, 'mean_word_length': 5.0488888888888885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1576619', 'n_tokens_mistral': 855, 'n_tokens_neox': 823, 'n_words': 257}