getaddrinfo在node.js中使用繁琐时ENOTFOUND

Cot*_*ten 6 node.js

我正在尝试使用Tedious连接到本地SQL Express服务器但仍在继续

failed Error: getaddrinfo ENOTFOUND
Run Code Online (Sandbox Code Playgroud)

我在这里使用了错误的地址吗?

  var Connection = require('tedious').Connection;

  var config = {
    userName: 'sa',
    password: 'mypassword',
    server: 'LOCALHOST\\SQLEXPRESS',
  };

  var connection = new Connection(config);

  connection.on('connect', function(err) {
    // If no error, then good to go...
      if(err) {
        console.log(err);
        return;
      } 
      executeStatement();
    }
  );
Run Code Online (Sandbox Code Playgroud)

Cot*_*ten 5

"不支持主机名\实例名的Microsoft样式字符串." - pekim

我在github上发布了同样的问题,这里是完整的答案:https://github.com/pekim/tedious/issues/118