Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Mongoose plugin for Symfio
branch: master

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.

Something went wrong with that request. Please try again.