Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/srounce/skipper


https://github.com/srounce/skipper

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

#Skipper
A lightweight multipurpose controller chassis

###Example of controller interface (unstable)

####mycontroller.js:
```javascript
controller(function MyController()
{
extends(require('./mysupercontroller'))

route(function () {
console.log('>> the index');
})

route(function namedFunc() {
console.log('>> namedFunc');
})

route(function otherNamedFunc() {
before(connectCompatibleMiddleware);

console.log('>> otherNamedFunc')
})

before([ namedFunc, otherNamedFunc ], function(req, res) {
// Connect compatible middleware
})

after([ namedFunc ], middlewareFunc)

})
```