node package manager

level-http-recorder

A rudimentary middleware / handler that records http requests to a local level db

level-http-recorder

A rudimentary middleware / handler that records http requests to a local level db.

This module expects the given db to support:

  • levelup interface
  • bytewise key encoding
  • json value encoding
var stack = require('stack')
var db = require('level-bytewise')('./mydb')
var http = require('http')
 
var levelHttpRecorder = require('level-http-recorder')(db)
 
http.createServer(stack(levelHttpRecorder))
 
var stack = require('stack')
var db = require('level-bytewise')('./mydb')
var http = require('http')
 
var levelHttpRecorder = require('level-http-recorder')(db, function (requestDatarequest) {
    // do stuff to request data 
    // DO NOT modify request! 
})
 
http.createServer(stack(levelHttpRecorder))

can be used with DarkMagic