Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 469 Bytes

readme.md

File metadata and controls

24 lines (18 loc) · 469 Bytes

Express Controller

Yet another approach to MVC for Express.

Usage

Controller = require "express-controller"

module.exports = new Controller
  name  : "home"
  routes  :
    display :
      method  : "GET"
      url     : "/"
      action  : (options, req, res) -> res.send "Welcome home!"

About

This is generally a basis for specialized controller classes, like ModelController. One can use it as it is though.