Skip to content
No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
index.js
package.json

README.md

iZi Controllers

Express controllers with annotations.

Based on express-controllers.

Installation

npm: $ npm install izi-controllers

Usage

Controller file:

/**
 * @get /
 */
exports.index = function (req, res) {
    res.send('this is index');
};

/**
 * @get /test
 * @get /test/:param1
 */
exports.test = function (req, res) {
    res.send('this is test');
};

/**
 * @post /post
 */
exports.post = function (req, res) {

};

In application file:

var express = require('express'),
    controllers = require('izi-controllers'),
    app = express();

app.set('controllers path', __dirname + '/controllers/');
app.use(app.router);
controllers(app);
app.listen(3000);
Something went wrong with that request. Please try again.