上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页
摘要: 1. const Promise = require('bluebird') const fs = Promise.promisifyAll(Promise.promisify(require('fs'))) 2.针对node npm部分模块,比如xml2js,不支持bluebird包装的形式,解决 阅读全文
posted @ 2018-04-08 17:25 江山一族 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1,输入命令tmux使用工具 2,上下分屏:ctrl + b再按 " 3,左右分屏:ctrl + b 再按 % 4,切换屏幕:ctrl + b 再按o 5,关闭一个终端:ctrl + b 再按x 6,上下分屏与左右分屏切换: ctrl + b 再按空格键 tmux里的session,window,p 阅读全文
posted @ 2018-04-08 17:10 江山一族 阅读(581) 评论(0) 推荐(0) 编辑
摘要: var user = db.getCollection('user') //user.find({},{_id:0}).pretty().count() user.find({age:{$gte:25,$lt:70}},{_id:-1}) .sort({age:-1}) .skip(2).limit 阅读全文
posted @ 2018-04-08 17:05 江山一族 阅读(7347) 评论(0) 推荐(0) 编辑
摘要: git账号:eggsy.cao@pictureworks.biz eggsycao 1.新建文件夹,并进入,命令窗口:git init 2.提交文件 git add fileName(git add *) 想反悔:git reset HEAD 文件名 git commit -m "add some 阅读全文
posted @ 2018-04-03 08:33 江山一族 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1.获取镜像: docker pull mysql 2,查看已安装的镜像: docker image 3,运行: 查看docker运行:docker info(docker run ubuntu echo hello world ) docker run mysql 4.查看正在运行的docker容 阅读全文
posted @ 2018-03-25 22:29 江山一族 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1.Promise.all 的用法; 同时开始执行,而且每个promise的结果(resolve或reject时传递的参数值),和传递给 Promise.all 的promise数组的顺序是一致的。 var promise = Promise.resolve(3); var promise2 = 4 阅读全文
posted @ 2018-03-23 12:14 江山一族 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 注意: 别用multer 上传文件了,太坑了,普通文本获取不到,折腾了半天没有解决,最后采用 multiparty 解决了; 更过multiparty 参数,请参考https://www.npmjs.com/package/multiparty 阅读全文
posted @ 2018-03-22 11:19 江山一族 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 注意:一定要写成 “” ,否则后台一直接收不到 router.post('/form',async(ctx,next)=>{ const form1 = ctx.request.body; console.log(form1); //const form1 = JSON.parse(form) // 阅读全文
posted @ 2018-03-20 16:45 江山一族 阅读(1697) 评论(0) 推荐(0) 编辑
摘要: 1. router.post('/form',async(ctx,next)=>{ const form = ctx.request.body; console.log('用户名:'+form.userName+' '+'密码:'+form.password); ctx.body = { resul 阅读全文
posted @ 2018-03-20 14:23 江山一族 阅读(2278) 评论(0) 推荐(0) 编辑
摘要: 1.get方式: http://localhost:3000/?user=000001&body=0002&age=26 const router = require('koa-router')() router.get('/',async (ctx, next) => { console.log( 阅读全文
posted @ 2018-03-20 13:30 江山一族 阅读(392) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页