I am trying to run the simplest hello world with Node.js and the mssql
package.
https://www.npmjs.org/package/mssql
- I create a new folder, with an empty JS file (app.js)
- I copy and paste the sample from the
mssql
package page to the js file. - I only change the config object with my DB connection settings.
- I run
npm install mssql
which is successful. - I run node app.js
What happens is that the code doesn't get into the callback after creating a connection. So in the code below:
var connection = new sql.Connection(config, function(err) {
alert(1);
...
//more code...
});
I never get to the alert. No exceptions or errors either
I am probably missing something... Can you please help me spot it?
Update: I should mention that the DB is on Azure...