const fs = require('fs');
const path = require('path');
const System = require('../base/system');
module.exports = function (app) {
  const routePath = `${__dirname}/routes`;
  fs.readdir(routePath, (err, rs) => {
    if (rs) {
      rs.forEach((r) => {
        const func = require(`${routePath}/${r}`);
        func.call(null, app);
      });
    }
  });
};
