title: Can't connect Node.js server to Azure SQL Database
body: <p>I'm running a simple Node.js server on Heroku. I've set up an Azure SQL database and I'm just trying to establish a connection to it from the server. I'm using <a href="http://pekim.github.io/tedious/" rel="nofollow">tedious.js</a> to connect. As far as I can tell, I'm following the patterns in the docs, but the connection doesn't go through. This is the code I have (altered username and password). For now, the connect function is called upon a GET request to the "/data" page from my browser, but the page never loads and the connection never goes through. Any pointers?</p>
  
  <pre><code>var azure = require("azure-storage");
  
  var Connection = require("tedious").Connection;
  
  var config = {
    Server : "cultureofthefewpractice.database.windows",
    username : "XXXXX",
    password : "XXXXX",
    options : {
      port: 1433,
      Database : "cultureofthefewpracticedatabase",
      connectTimeout : 3000,
    },
  };
  
  
  var connection = new Connection(config);
  
  function connect(request, response) {
    connection.on("connect", function(error) {
      //If no error, then good to go
      console.log("Connected to database! Booyah.");
      executeStatement();
  
      response.send("Connected to database! Booyah.");
    }, function (info) {
      console.log(info);
    });
  }
  
  exports.connect = connect;
  </code></pre>