企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
~~~ const Koa = require('koa'); const app = new Koa() const md1= async (ctx,next)=>{ ctx.type="text/html;charset=utf-8"; await next(); } const md2 = async (ctx,next)=>{ ctx.body="hello world"; await next() } const md3 = async (ctx,next)=>{ ctx.body = ctx.body+"JavaScript" await next() } app.use(md1); app.use(md2); app.use(md3); app.listen(8080) ~~~