Node数据库连接池报"Cannot call write after a stream was destroyed"

var config = {
    user: 'sa', //用户名
    password: '123123',
    server: '123123',
    database: '123123', //数据库名
    port: 1433,
    options: {
        **encrypt**: false // Use this if you're on Windows Azure  
    },
    pool: {
        min: 0,
        max: 10,
        idleTimeoutMillis: 3000
    }
};

原因就是encrypt这个参数,设置为false就OK了

你可能感兴趣的:(Node,连接池)