2022年7月2日
摘要: 使用sequelize操作mysql 下载egg-sequelize: npm i --save egg-sequelize mysql2 在plugin.js文件引入插件 //在plugin.js文件中引入egg-sequelize modele.eports = { sequelize:{ en 阅读全文
posted @ 2022-07-02 22:18 文种玉 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 在app目录下创建middleware文件夹 在muiddleware创建js文件 function checktoken(){ return async function(ctx,next){ console.log('middleware checktoken'); await next(); 阅读全文
posted @ 2022-07-02 22:05 文种玉 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 按快捷键 ctrl+shift+p 输入snippets 选择配置用户自定义代码块 选择 js.code-snippets 复制如下 { "A": {//第一个自定义的代码片段 "prefix": "/*", //输入/* "body": ["/**", "*", "*/"], }, "B":{// 阅读全文
posted @ 2022-07-02 20:21 文种玉 阅读(238) 评论(0) 推荐(0) 编辑