/node-dbshell

This is a script to provide db shell for node with mongoose for generator-angular-fullstack. Like a rails console for generator angular fullstack (node + mongoose)

Primary LanguageJavaScript

node-dbshell

Gist
This is a script to provide db shell for generator-angular-fullstack with mongoose.
It loads all your models and their schemas as defined with mongoose along with your config and establishes a databse connection to mongodb as defined by the config.
After loading the shell you can run mongoose queries on your models like

	var users = User.find(function(e,d){
    	console.log(d);
  	});

How to use

1. Include this file in your applications folder. 2. Make sure the config paths are correct. 3. Run this file as `[NODE_ENV=env] node dbShell.js [/path/to/config/file] [/path/to/models/directory]`