0.5.3 • Published 7 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
7 years ago
0.5.2
7 years ago
0.5.1
7 years ago
0.5.0
7 years ago
0.4.0
8 years ago
0.3.1
9 years ago
0.3.0
9 years ago
0.2.2
9 years ago
0.2.1
9 years ago
0.2.0
9 years ago
0.1.7
9 years ago
0.1.6
9 years ago
0.1.5
9 years ago
0.1.4
10 years ago
0.1.3
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago