title: unable to Connect with MsSql database in node js
body: <p>I am not able to connect with mssql server and i am getting error when executing the coding.. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.dbConfig = {
      // user: "sa",
      // password: "sa",
      // //server: "DESKTOP-QHBGOMQ",
      // server: '127.0.0.1',
      // //server: "localhost",
      // database: "ArduinoDataLogger",
      // port: 1433,
      //
      // connectionString: "Driver={SQL Server Native Client 11.0};Server=#{server}\\sql;Database=#{database};Uid=#{user};Pwd=#{password};"
      userName: 'sa',
      password: 'sa',
      server: 'DESKTOP-QHBGOMQ',
      database: 'ArduinoDataLogger',
      port: 1443,
      debug: true,
      driver: 'tedious',
      options: {
          port: 1443,
          encrypt: false,
          database: 'ArduinoDataLogger',
          useColumnNames: false,
          debug: {
              packet: true,
              data: true,
              payload: true,
              token: true,
              log: true
          }
      }
  
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>The error i am getting it is: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ConnectionError: Failed to connect to DESKTOP-QHBGOMQ:1443 - Could not connect (sequence)
      at Connection.tedious.once.err (C:\Users\JanaVithu\Desktop\NewProject\node_modules\mssql\lib\tedious.js:237:17)
      at Connection.g (events.js:292:16)
      at emitOne (events.js:96:13)
      at Connection.emit (events.js:188:7)
      at Connection.socketError (C:\Users\JanaVithu\Desktop\NewProject\node_modules\tedious\lib\connection.js:1016:14)
      at C:\Users\JanaVithu\Desktop\NewProject\node_modules\tedious\lib\connection.js:861:25
      at SequentialConnectionStrategy.connect (C:\Users\JanaVithu\Desktop\NewProject\node_modules\tedious\lib\connector.js:154:9)
      at Socket.onError (C:\Users\JanaVithu\Desktop\NewProject\node_modules\tedious\lib\connector.js:170:16)
      at emitOne (events.js:96:13)
      at Socket.emit (events.js:188:7)
    code: 'ESOCKET',
    originalError:</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have enabled tcp/ip and all my mssql server are running (automatic). 
  i even changed the tcp/ip dynamic = 0..
  i really have no idea how to fix it and i have tried all the possible solutions which was suggested by experts (forums)..</p>
  
  <p>Thank you.
  it would be great if anyone could suggest/help me to sort it out this issue..</p>