0.5.3 • Published 6 years ago
heromongo v0.5.3
heromongo
Shortcuts to mongo
, mongodump
and mongorestore
by reading MONGODB_URL from Heroku environment variables.
Installation
$ npm install -g heromongo
$ sudo ln -s /usr/local/lib/node_modules/heromongo/index.js /usr/local/bin/heromongo
Configuration
The only thing configurable right now is the app name mapping:
.heromongo.json
contains a few default app name entries, copy this file to~
to prevent it from being updated bynpm update
.
Usage
$ heromongo // connect to testing database
$ heromongo connect [staging] // connect to staging database
$ heromongo run [staging] scripts/nice.js // run script on staging database
$ heromongo dump [testing] // dump testing database
$ heromongo dump [testing] --excludes 'users invoices' --query '{\"ts\": { \"$gt\": 0 } }' --collections 'customers orders'"
// dump testing database but exclude users and invoices, and only get a subset of collections customers and orders
$ heromongo restore [staging] ~/Sites/dump/staging/2016-03-24_12-37-03 // restore staging database from this folder
$ heromongo export [testing] users -q '{ name: "John Doe" }' -f 'name,address' // export testing collection
See also: $ heromongo --help
0.5.3
6 years ago
0.5.2
6 years ago
0.5.1
6 years ago
0.5.0
6 years ago
0.4.0
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.2.2
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago
0.1.7
8 years ago
0.1.6
8 years ago
0.1.5
8 years ago
0.1.4
8 years ago
0.1.3
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago