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
.
npm i -g https://github.com/apolloyang2017/pino-mongodb.git
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: 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
-h, --help output usage information
npm t
Licensed under MIT.