0.1.2 • Published 13 years ago

co-mandy v0.1.2

Weekly downloads
2
License
BSD
Repository
github
Last release
13 years ago
  • Co-Mandy

  • Basic module to store DB connections that you want to keep separate from JugglingDB

Usage

  • config/mandy.js/coffee exports functions with namespacing to be used by Co-Mandy
    	```coffeescript
    	# the namespace used is the exports[key] you define
    	exports.mongoose = (env)->
    			mongoose = require("mongoose")
    		
    			switch env 
    				when 'production' then return mongoose.connect "mongodb://localhost/production"
    				when 'dev' then return mongoose.connect "mongodb://localhost/dev"
    				when 'test' then return mongoose.connect "mongodb://localhost/test"
    				else return mongoose.connect "mongodb://localhost/test"
    	```
    		
  • define models in app/models/ directory

  • adds mandyGet method to the compound object so you can easily retrieve your DB connections based on their namespaces

    	```coffeescript
    	# return relevent connection from Mandy
    	mongoose = compound.mandyGet('mongoose')
    	```
  • checkout examples/

0.1.3

13 years ago

0.1.2

13 years ago

0.1.1

13 years ago

0.1.0

13 years ago

0.0.0

13 years ago