mngs
A pleasant CLI for rapid development with Mongoose.
Last updated 3 years ago by jondot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mngs 
SYNC missed versions from official npm registry.

mngs

A pleasant CLI for rapid development with Mongoose.

Quickstart

$ yarn add --dev mngs

And add the following script to your package.json file:

"scripts":{
    "mongoose":"MNGS_MODELS=config/mngs.js mngs"
}

And here's how config/mngs.js looks like:

// connects mongoose. grab your own setup
require('./mongoose-setup.js')

// exports a map, e.g. { User: <mongoose model>, Post: <mongoose model> }
const models = require(path.join(__dirname, '../models'))
module.exports = models

Usage

Use your models (they are exposed directly) to print p, log l, and display on a table t. Additionally you can simulate a toJSON with js to see what part of your model is exposed.

>> t(User.find())
>> p(User.find())
>> l(User.find())
>> js(User.find())

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Thanks:

To all Contributors - you make this happen, thanks!

Copyright

Copyright (c) 2017 Dotan Nahum @jondot. See LICENSE for further details.

Current Tags

  • 1.0.3                                ...           latest (3 years ago)

4 Versions

  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |