企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` const koa = require('koa'); const app = new koa(); const Router = require('koa-router'); var requireDirectory = require('require-directory'); requireDirectory(module, './routers',{visit: visitor}); function visitor(obj){ if(obj instanceof Router){ app.use(obj.routes()) } } app.listen(8080) ```