Linux에서 실행할 때 node.js에서 SQL Server 또는 SQL Azure에 어떻게 연결할 수 있습니까?Linux의 node.js에서 SQL Server에 액세스
npm에서 찾은 드라이버에는 Windows + VS2005가 모두 필요합니다. Linux에서 SQL Server에 액세스 할 수 있습니까?
Linux에서 실행할 때 node.js에서 SQL Server 또는 SQL Azure에 어떻게 연결할 수 있습니까?Linux의 node.js에서 SQL Server에 액세스
npm에서 찾은 드라이버에는 Windows + VS2005가 모두 필요합니다. Linux에서 SQL Server에 액세스 할 수 있습니까?
'tedious'을 직접 사용하는 실제 해결책을 찾았습니다.
var Connection = require('tedious').Connection;
var config = {
userName: '[email protected]',
password: 'mypassword',
server: 'servername.database.windows.net',
// If you're on Windows Azure, you will need this:
options: {
encrypt: true
}
};
var connection = new Connection(config);
connection.on('connect', function(err) {
if(err)
console.log(err)
else
console.log('works!!!!!')
});
이것은 좋은 일을했습니다. – Muath