var async = require("async");

async.waterfall([
    function(callback){
        console.log(1);
        callback(null,1); //如果有error异常处理,否则向下一个函数传递参数 1
    },
    function(n, callback){ //接受参数1
        console.log(n);  //n=1
        callback(null,2);
    },
    function(n, callback){ //接受参数2
        console.log(n);n=2
    }
], function(err, results){
    //如果有error则执行此处函数
   console.log('异常处理');
});

Vue + Parse Platform

该架构是一整套基于 nodejs 全栈的开发,简单、高效 安装 安装环境以Windows操作系统为例 Nodejs安装 在Nodejs官网下载 TLS 版本 选择 Windows Binary (...

阅读全文

vscode编译

git clone https://github.com/Microsoft/vscode.git git branch -a git checkout remotes/origin/release/1.7 Failed at the oniguruma@6.1.1 install scri...

阅读全文

Nodejs Windows 安装

下载 前往https://nodejs.org/en/download/下载 Windows Binary (.zip) 版 解压到 D:\Program_Files\nodejs 设置 npm config set prefix "D:\Program_Files\...

阅读全文

欢迎留言