node_api_template-源码

上传者: 42109598 | 上传时间: 2021-05-11 22:03:04 | 文件大小: 31KB | 文件类型: ZIP
节点API模板 应用程序 nodejs版本:8+( ) Koa( ) Koa-Router( ) 巴别塔 npm install npm start 中间件 在./src/middlewares添加Middelware代码,并导出aysnc函数(ctx,下一个) 样本: module . exports = aysnc function ( ctx , next ) { console . info ( 'let start at beginning' ) ; await next ( ) ; console . info ( 'let start at end' ) ; } 控制器 在./src/controllers添加控制器代码并导出控制器类 \\ MyController . js class MyController { } module . exports

文件下载

资源详情

[{"title":"( 28 个子文件 31KB ) node_api_template-源码","children":[{"title":"node_api_template-master","children":[{"title":".gitignore <span style='color:#111;'> 78B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"01_user.js <span style='color:#111;'> 2.28KB </span>","children":null,"spread":false},{"title":"00_init.js <span style='color:#111;'> 333B </span>","children":null,"spread":false}],"spread":true},{"title":"api.config.js <span style='color:#111;'> 191B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 897B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"services","children":[{"title":"user.js <span style='color:#111;'> 394B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 799B </span>","children":null,"spread":false}],"spread":true},{"title":"server.js <span style='color:#111;'> 673B </span>","children":null,"spread":false},{"title":"db","children":[{"title":"pg.js <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 232B </span>","children":null,"spread":false},{"title":"pg","children":[{"title":"v0","children":[{"title":"01.js <span style='color:#111;'> 270B </span>","children":null,"spread":false}],"spread":true},{"title":"init.js <span style='color:#111;'> 465B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"middlewares","children":[{"title":"auth.js <span style='color:#111;'> 944B </span>","children":null,"spread":false},{"title":"logger.js <span style='color:#111;'> 778B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 462B </span>","children":null,"spread":false},{"title":"errors.js <span style='color:#111;'> 508B </span>","children":null,"spread":false}],"spread":true},{"title":"annotation.js <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 177B </span>","children":null,"spread":false},{"title":"locales","children":[{"title":"en-US.json <span style='color:#111;'> 126B </span>","children":null,"spread":false},{"title":"zh-CN.json <span style='color:#111;'> 140B </span>","children":null,"spread":false}],"spread":true},{"title":"controllers","children":[{"title":"user.js <span style='color:#111;'> 885B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"version.js <span style='color:#111;'> 228B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".babelrc <span style='color:#111;'> 48B </span>","children":null,"spread":false},{"title":"config","children":[{"title":"test.json <span style='color:#111;'> 487B </span>","children":null,"spread":false},{"title":"development.json <span style='color:#111;'> 494B </span>","children":null,"spread":false}],"spread":true},{"title":"package-lock.json <span style='color:#111;'> 68.47KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明