UNPKG

astroboy

Version:

Astroboy(阿童木)is a Nodejs SFB(Separation of Front and Back ends) framework, built on koa2.

16 lines 564 B
"use strict"; const assert = require("assert"); const lodash = require("lodash"); const Loader_1 = require("../core/Loader"); class AstroboyBootLoader extends Loader_1.Loader { async load() { const entries = await this.globDirs(this.config.pattern || []); for (const entry of entries) { const boot = require(entry); assert(lodash.isFunction(boot), `${entry} must return a function.`); await boot(this.app); } } } module.exports = AstroboyBootLoader; //# sourceMappingURL=AstroboyBootLoader.js.map