首页 Node Koa.js框架

用法


自定义函数文件:fun.js

module.exports = function(){
	return "www.liboke.cn";
}




调用:index.js

const fun = require("./fun");

app.use(async (ctx, next) => {
	ctx.body = fun();
}