<commit_before># koa-neo4j
`koa-neo4j` is a framework for creating web servers that embody application's logic powered by a [Neo4j Graph Database](https://neo4j.com/) backend.

In a Neo4j enabled application, conducting queries directly from client side might not be the best choice:

- Database is exposed to the client, unless some explicit security mechanism is in place; one can *see* the innards of the database by `view source`
- There is no **one server to rule them all**, queries are `string`s, scattered around different clients (web, mobile, etc.)
- Third-party developers might not be familiar with Cypher

`koa-neo4j` addresses all of the above issues:

- Stands as a middle layer between clients and database 
- Gives your server's logic structure, in form of a file-based project; finally a home for Cypher! 
- Converts Cypher files to REST routes, a cross-platform web standard that developers are familiar with, it does so on top of the widely-adapted [**koa**](http://koajs.com/) server
 
 In addition it comes with *goodies*:
 
 - Lifecycle hooks, allowing one to tweak incoming and outgoing data based on one's needs, allowing her to utilize the full power of `nodejs` and `javascript` ecosystem
 - None-Opinionated user management, you define how your users and roles are defined, the framework provides authentication and role-based access management

### Install
```bash
npm install koa-neo4j --save
```

### Usage
You can find a comprehensive example at [koa-neo4j-example](https://github.com/satratech/koa-neo4j-example) 
```javascript
var KoaNeo4jApp = require('koa-neo4j');

var app = new KoaNeo4jApp({
    apis: [
        {
            method: 'GET',
            route: '/articles/:skip/:limit',
            cypherQueryFile: './cypher/articles.cyp'
        },
        {
            method: 'POST',
            route: '/article',
            cypherQueryFile: './cypher/create_article.cyp'
        }
    ],
    neo4j: {
        boltUrl: 'bolt://localhost',
        user: 'neo4j',<commit_msg>rewording<commit_after># koa-neo4j
`koa-neo4j` is a framework for creating web servers that embody application's logic powered by a [Neo4j Graph Database](https://neo4j.com/) backend.

In a Neo4j enabled application, conducting queries directly from client side might not be the best choice:

- Database is exposed to the client, unless some explicit security mechanism is in place; one can *see* the innards of the database by `view source`
- There is no **one server to rule them all**, queries are `string`s, scattered around different clients (web, mobile, etc.)
- Third-party developers might not be familiar with Cypher

`koa-neo4j` addresses all of the above issues:

- Stands as a middle layer between clients and database 
- Gives your server's logic structure, in form of a file-based project; finally a home for Cypher! 
- Converts Cypher files to REST routes, a cross-platform web standard that developers are familiar with, it does so on top of the widely-adapted [**koa**](http://koajs.com/) server
 
 In addition it comes with *goodies*:
 
 - Lifecycle hooks, allowing one to tweak incoming and outgoing data based on one's needs, allowing her to utilize the full power of `nodejs` and `javascript` ecosystem
 - None-Opinionated user management, you describe (in Cypher) how your users and roles are stored, the framework provides authentication and role-based access management

### Install
```bash
npm install koa-neo4j --save
```

### Usage
You can find a comprehensive example at [koa-neo4j-example](https://github.com/satratech/koa-neo4j-example) 
```javascript
var KoaNeo4jApp = require('koa-neo4j');

var app = new KoaNeo4jApp({
    apis: [
        {
            method: 'GET',
            route: '/articles/:skip/:limit',
            cypherQueryFile: './cypher/articles.cyp'
        },
        {
            method: 'POST',
            route: '/article',
            cypherQueryFile: './cypher/create_article.cyp'
        }
    ],
    neo4j: {
        boltUrl: 'bolt://localhost',
        user: 'neo4j',
{'fraction_non_alphanumeric': 0.09398961167449914, 'fraction_numerical': 0.006925550333910463, 'mean_word_length': 3.3624595469255665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '582037', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1116, 'n_words': 481}