symfio-contrib-mongoose

Mongoose plugin for Symfio.

npm install symfio-contrib-mongoose
14 downloads in the last week
59 downloads in the last month

symfio-contrib-mongoose

Mongoose plugin for Symfio.

Build Status Dependency Status

Usage

symfio = require "symfio"

container = symfio "example", __dirname

container.inject require "symfio-contrib-mongoose"

container.inject (model) ->
  model "News", "news", (mongoose) ->
    new mongoose.Schema
      title: String

Configuration

connectionString

Default value is "mongodb://localhost/#{name}".

Services

mongoose

Original mongoose module.

mongodb

Original mongodb module.

connection

Mongoose connection instance.

model

Model define helper. First argument is container key, second argument is collection name, last argument is a model factory.

npm loves you