Skip to content

A pleasant CLI for rapid development with Sequelize or Mongoose.

Notifications You must be signed in to change notification settings

jondot/hyperportal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperportal

A pleasant CLI for rapid development with Sequelize or Mongoose.

Quickstart

$ yarn add --dev hyperportal

And add the following script to your package.json file. Let's call it 'console'.

"scripts":{
    "console":"HYP_MODELS=config/hyperportal.js hyp"
}

And here's how config/hyperportal.js looks like, when you're using Mongoose:

// 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

And now, run:

$ yarn console

Usage

Use your models (they are already available in the console) 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.

About

A pleasant CLI for rapid development with Sequelize or Mongoose.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published