Mongoose plugin for Symfio
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
test
.gitignore
.travis.yml
Gruntfile.coffee
LICENSE
README.md
package.json

README.md

symfio-contrib-mongoose

Mongoose plugin for Symfio.

Build Status Coverage Status Dependency Status NPM version

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.