Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

co-mandy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-mandy

custom hooks to bypass jugglingdb for compound.js

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source
  • 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

    # 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

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

FAQs

Package last updated on 23 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc