symfio

2.0.8 • Public • Published

Symfio

Symfio

Modular framework based on Node.js and kantaina.

Example

symfio = require "symfio"
 
# create container 
container = symfio "fruits-example"__dirname
 
# define own plugin 
fruitsPlugin = (model, get) ->
  model "Fruit""fruits"(mongoose) ->
    new mongoose.Schema
      name: String
 
  get "/fruits"(Fruit) ->
    (req, res) ->
      Fruit.findOne (err, fruit) ->
        return res.send 500 if err
        return res.send 404 unless fruit
        res.send fruit
 
# load plugins 
container.injectAll([
  require "symfio-contrib-winston"
  require "symfio-contrib-express"
  require "symfio-contrib-mongoose"
  fruitsPlugin
]).then ->
  container.get "listener"
.then (listener) ->
  listener.listen()

Quick Start

Use grunt-init-symfio to bootstrap your first Symfio project.

Project Status

Build Status Dependency Status

Tests

If you haven't already done so, install grunt.

Once grunt is installed, clone Symfio repository and run tests:

git clone git://github.com/symfio/symfio.git
cd symfio
npm test

Readme

Keywords

none

Package Sidebar

Install

npm i symfio

Weekly Downloads

3

Version

2.0.8

License

none

Last publish

Collaborators

  • rithis