0.0.25 • Published 8 years ago

http2mongo v0.0.25

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

http2mongo

Koa.js middleware, sniffer http request/response save to mongodb

Not ready to use but this can run

npm.io

Install

npm install --save http2mongo

Usage

My code is really simple and easy to use, index.js is best readme file.

    const sniffer = require('http2mongo')

    app.use(cors({expose: ['Authorization']}))
    app.use(logger())
    app.use(errorTrace())
    app.use(bodyParser())
    app.use(sniffer.logSniffer())
    app.use(router.routes())

    sniffer({"host":"10.8.8.X", "port": 27017,"db":"myloooog", "apptag": "onionsMainApp"});
    app.listen(config.port);

Todo

  • test case