var uuid = require('node-uuid');
var express = require('express');
var requestLogger = require('./');

var app = express();

app.use(function(req, res, next) {
  req.uuid = uuid.v1();
  next();
});

app.use(requestLogger({
  table: 'requests'
, connStr: 'postgres://localhost:5432/test'
, customFields: {uuid: 'uuid'}
}));

app.get('/hello', function(req, res){
  var body = 'Hello World';
  res.setHeader('Content-Type', 'text/plain');
  res.setHeader('Content-Length', body.length);
  res.end(body);
});

app.listen(3000);
console.log('Listening on port 3000');

@@ -221,28 +221,8 @@
 (%7B%0A 
- table: 'requests'%0A,
  con
@@ -260,16 +260,52 @@
 2/test'%0A
+, table: 'requests'%0A, plan: 'month'%0A
 , custom

clean up