symfio-contrib-mongoose

Mongoose plugin for Symfio.

symfio-contrib-mongoose

Mongoose plugin for Symfio.

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

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

Original mongoose module.

Original mongodb module.

Mongoose connection instance.

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