<commit_before><p align="center">
  <img src="https://raw.github.com/facet/gatekeeper/master/assets/facet.png" />
</p>
# Facet Platform

Provides extensible common utility classes for rapid JSON API development. Offers the following functionality:

* Abstration of middleware specific code for framework agnostic use
* Handling of request/response lifecycle
* Built in CRUD functionality via find, findOne, create, update, delete functions for any resource you create
* Management of event bus (aka [Intercom](https://github.com/facet/intercom)) used for decoupled module communication

test-test

## Examples

#### Creating a new resource API class

See the [facet core module](https://github.com/facet/core) for details on creating API resources.

```js
var ApiCore = require('facet-core').ApiCore;

var TodosAPI = function(facet.moduleOptions) {
  // define mongoose schema and bind events here
  // see other facet modules for examples:
  //   https://github.com/facet/gatekeeper
  //   https://github.com/facet/category
  //   https://github.com/facet/catalog
};

/**
 * Todos API inherits from API Core which enables CRUD functionality.
 * The definition of new facet classes would be done in a different 
 * module which depends on facet-core
 */
util.inherits(TodosAPI, ApiCore);
```

#### Setting up a JSON API server using express 4
<commit_msg>Removed test<commit_after><p align="center">
  <img src="https://raw.github.com/facet/gatekeeper/master/assets/facet.png" />
</p>
# Facet Platform

Provides extensible common utility classes for rapid JSON API development. Offers the following functionality:

* Abstration of middleware specific code for framework agnostic use
* Handling of request/response lifecycle
* Built in CRUD functionality via find, findOne, create, update, delete functions for any resource you create
* Management of event bus (aka [Intercom](https://github.com/facet/intercom)) used for decoupled module communication

## Examples

#### Creating a new resource API class

See the [facet core module](https://github.com/facet/core) for details on creating API resources.

```js
var ApiCore = require('facet-core').ApiCore;

var TodosAPI = function(facet.moduleOptions) {
  // define mongoose schema and bind events here
  // see other facet modules for examples:
  //   https://github.com/facet/gatekeeper
  //   https://github.com/facet/category
  //   https://github.com/facet/catalog
};

/**
 * Todos API inherits from API Core which enables CRUD functionality.
 * The definition of new facet classes would be done in a different 
 * module which depends on facet-core
 */
util.inherits(TodosAPI, ApiCore);
```

#### Setting up a JSON API server using express 4

{'fraction_non_alphanumeric': 0.10266864343958487, 'fraction_numerical': 0.0007412898443291327, 'mean_word_length': 4.261208576998051, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '157959', 'n_tokens_mistral': 764, 'n_tokens_neox': 751, 'n_words': 282}