loglog-server-mongodb

1.1.0 • Public • Published

Loglog Server MongoDB Data Source

MongoDB data source for a loglog server. This package is bundled with the loglog server module.

Install:

npm install loglog-server-mongodb

Usage:

var server = require('loglog-server');

server.set( 'source', require('loglog-server-mongodb')({
  connection: 'mongodb://host:port/db'
, collection: 'collection_that_stores_logs'
  // See all options for db.createCollection()
  // http://mongodb.github.io/node-mongodb-native/2.0/api-docs
, collectionOptions: {
    capped: true // (default)
  , size:   1000 * 1000 * 1000 * 4 // (default) 4gigs
  }
}));

server.listen();

Readme

Keywords

Package Sidebar

Install

npm i loglog-server-mongodb

Weekly Downloads

1

Version

1.1.0

License

ISC

Last publish

Collaborators

  • johndotawesome