##Target
- Scalable restful api with well extensive framework.
- Support log server.
- Support authentication with json web token.
##Usage
- Create new file in "routes" folder.
- Use following code as example.
'use strict'
var express = require("express");
var routes_base = require("../lib/routes_base.js"); //required
// Your code start here.
var _post = function(req, res) {
res.send("new routes post!");
}
var _get = function(req, res) {
res.send("new routes get!");
}
// Add to router list.
// [method, path, middleware, callback]
var router_list = [
['post', '/newapi', null, _post],
['get', '/newapi', null, _get]
]
var routes = new routes_base(router_list, express.Router());
module.exports = routes.routes();
- Done!