<commit_before># koa-pg #

Koa middleware to get you a Postgres client on the way down the middlewares,
and release it on the way back up the middlewares.

## Synopsis ##

```
var koa = require('koa')
var koaPg = require('koa-pg')

var app = koa()

app.use(pgKoa('postgres://clubsonline@localhost/clubsonline'))

app.use(function *(next) {
    // Here we have access to this.pg which is client returned from pg.connect().
    var result = yield this.client.query_('SELECT now()')
    console.log('result:', result)

    this.body = result.rows[0].now.toISOString()
})

app.listen(3000)
```

## Author ##

Written by [<NAME>](http://chilts.org/) - [Blog](http://chilts.org/blog/) -
[Twitter](https://twitter.com/andychilton).

## License ##
<commit_msg>Fix the readme example<commit_after># koa-pg #

Koa middleware to get you a Postgres client on the way down the middlewares,
and release it on the way back up the middlewares.

## Synopsis ##

```
var koa = require('koa')
var koaPg = require('koa-pg')

var app = koa()

app.use(pgKoa('postgres://clubsonline@localhost/clubsonline'))

app.use(function *(next) {
    // Here we have access to this.pg which is client returned from pg.connect().
    var result = yield this.pg.client.query_('SELECT now()')
    console.log('result:', result)

    this.body = result.rows[0].now.toISOString()
})

app.listen(3000)
```

## Author ##

Written by [<NAME>](http://chilts.org/) - [Blog](http://chilts.org/blog/) -
[Twitter](https://twitter.com/andychilton).

## License ##

{'fraction_non_alphanumeric': 0.1695250659630607, 'fraction_numerical': 0.006596306068601583, 'mean_word_length': 3.9413680781758957, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4164546', 'n_tokens_mistral': 545, 'n_tokens_neox': 524, 'n_words': 139}