framework.js 430 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. const path = require('path');
  3. // const naf = require('naf-framework');
  4. const egg = require('egg');
  5. const EGG_PATH = Symbol.for('egg#eggPath');
  6. class Application extends egg.Application {
  7. get [EGG_PATH]() {
  8. return path.dirname(__dirname);
  9. }
  10. }
  11. class Agent extends egg.Agent {
  12. get [EGG_PATH]() {
  13. return path.dirname(__dirname);
  14. }
  15. }
  16. module.exports = Object.assign(egg, {
  17. Application,
  18. Agent,
  19. });