router.js 435 B

1234567891011121314
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller, config } = app;
  7. const prefix = config.routePrefix;
  8. router.get(`${prefix}`, controller.home.index);
  9. router.post(`${prefix}/options`, controller.options.index);
  10. require('./z_router/project')(app); // 项目
  11. require('./z_router/table')(app); // 表
  12. require('./z_router/dir')(app); // 文件夹
  13. };