symfio-contrib-cruder

Cruder plugin for Symfio.

npm install symfio-contrib-cruder
6 downloads in the last week
22 downloads in the last month

symfio-contrib-cruder

Cruder plugin for Symfio.

Usage

symfio = require "symfio"

container = symfio "example", __dirname

container.set "pingResponse", "It's works!"

container.inject require "symfio-contrib-express"
container.inject require "symfio-contrib-mongoose"
container.inject require "symfio-contrib-cruder"

container.inject (model) ->
  model "Town", "towns", (mongoose) ->
    new mongoose.Schema
      title: type: String, required: true

  container.inject (resource, Town) ->
    resource Town

Dependencies

Services

cruder

Original cruder module.

resource

Resource define helper. First argument is model, second is resource options.

npm loves you