Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pino-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-mongodb

Insert JSON from stdin into MongoDB

  • 2.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by7.03%
Maintainers
1
Weekly downloads
 
Created
Source

pino-mongodb

Standard - JavaScript Style Guide

Insert JSON from stdin into MongoDB

This project is part of the pino logger family, however you can use it to parse and insert any JSON into the mongo.

Install

$ npm i -g pino-mongodb

Get started

$ echo '{"name": "Viktor"}' | pino-mongodb [options] [mongo-url]
$ cat many.logs | pino-mongodb [options] [mongo-url]
$ node ./app.js | pino-mongodb [options] [mongo-url]

Usage

Usage: pino-mongodb [options] [mongo-url]

Insert JSON from stdin into MongoDB

Options:
  -V, --version            output the version number
  -c, --collection <name>  database collection (default: "logs")
  -o, --stdout             output inserted documents into stdout
  -e, --errors             output insertion errors into stderr
  -u, --unified            use mongodb unified topology
  -h, --help               output usage information

Tests

To run unit tests:

$ npm t

To run integrational tests with real mongo server:

$ npm run trial

Note, you will have to have docker and docker-compose installed on your machine for that!

License

Licensed under MIT.

Keywords

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc