title: Error "ConnectionError [SequelizeConnectionError]: Failed to connect to localhost:1443 - Could not connect (sequence)" using sequelize-automate
body: <p>I'm getting a connection error when trying to automatically create the db table models using sequelize-automate.</p>
  
  <p>However, the connection I'm using for sequelize is working but it's in a different format and I'm not sure if sequelize-automate allows me to use the same format.</p>
  
  <pre><code>const Sequelize = require('sequelize');
  const util = require('util');
  const dbSequelize = require('../public/dbconfigSequelize.json');
  
  let databaseUrl = util.format(
    dbSequelize.server,
    dbSequelize.username,
    dbSequelize.password,
    dbSequelize.host,
    dbSequelize.database
  )
  
  function getConnection() {
    console.log('creating a new connection');
    return new Sequelize(databaseUrl, {
      pool: {
        max: 1
      },
      logging: console.log
    });
  }
  
  function checkAuthenticate() {
    sequelize
      .authenticate()
      .then(() =&gt; {
        console.log('Connection has been established successfully.');
      })
      .catch(err =&gt; {
        console.error('Unable to connect to the database:', err);
      });
  }
  
  const sequelize = getConnection();
  checkAuthenticate();
  
  module.exports = sequelize;
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>"scripts": {
      "generate-sequelize-models": "sequelize-automate -c sequelize-automate.config.json"
    }
  </code></pre>
  
  <p>sequelize-automate.config.json</p>
  
  <pre><code>{
    "dbOptions": {
      "database": "mydbname",
      "username": "myusername",
      "password": "mypassword",
      "dialect": "mssql",
      "host": "localhost",
      "logging": false
    },
    "options": {
      "type": "js",
      "dir": "./server/models"
    }
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>PS C:\Users\username\Documents\myelectronapp&gt; npm run generate-sequelize-models
  
  &gt; myelectronapp@0.1.0 generate-sequelize-models C:\Users\username\Documents\myelectronapp
  &gt; sequelize-automate -c sequelize-automate.config.json
  
  Database options: {"database":"mydbname","username":"myusername","password":"****","dialect":"mssql","host":"localhost","port":3306,"logging":false}
  Automate options: {"type":"js","camelCase":false,"dir":"./server/models","emptyDir":false}
  ConnectionError [SequelizeConnectionError]: Failed to connect to localhost:3306 - Could not connect (sequence)
      at C:\Users\username\Documents\myelectronapp\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:134:17
      at tryCatcher (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\promise.js:725:18)
      at _drainQueueStep (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\async.js:93:12)
      at _drainQueue (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\username\Documents\myelectronapp\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:456:21) {
    name: 'SequelizeConnectionError',
    parent: ConnectionError: Failed to connect to localhost:3306 - Could not connect (sequence)
        at ConnectionError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\errors.js:13:12)
        at Connection.socketError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connection.js:1288:56)
        at C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connection.js:1114:21
        at SequentialConnectionStrategy.connect (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connector.js:87:14)
        at Socket.onError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connector.js:100:12)
        at Socket.emit (events.js:311:20)
        at emitErrorNT (internal/streams/destroy.js:92:8)
        at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
        at processTicksAndRejections (internal/process/task_queues.js:84:21) {
      message: 'Failed to connect to localhost:3306 - Could not connect (sequence)',
      code: 'ESOCKET'
    },
    original: ConnectionError: Failed to connect to localhost:3306 - Could not connect (sequence)
        at ConnectionError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\errors.js:13:12)
        at Connection.socketError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connection.js:1288:56)
        at C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connection.js:1114:21
        at SequentialConnectionStrategy.connect (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connector.js:87:14)
        at Socket.onError (C:\Users\username\Documents\myelectronapp\node_modules\tedious\lib\connector.js:100:12)
        at Socket.emit (events.js:311:20)
        at emitErrorNT (internal/streams/destroy.js:92:8)
        at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
        at processTicksAndRejections (internal/process/task_queues.js:84:21) {
      message: 'Failed to connect to localhost:3306 - Could not connect (sequence)',
      code: 'ESOCKET'
    }
  }
  </code></pre>