I am trying to connect my nodejs/express app to SQL Server 2017 using Sequelize ORM. This is my first time of using SQL Server. I am not sure where is the problem.
Situation:-
- I create a database using SQL Server Management Studio 
- I create an another user under security > login (for eg:- userName, passWord) 
- And make this user the owner of that database 
Issues:
- When I tried to connect to SQL Server using Management Studio (using SQL Server authentication), my connection is established every time. 
- But when I tried to connect same database with my nodejs app I got errors: - Error:- [SequelizeAccessDeniedError: Login faled for user '']## 
Note: I already tried mssql npm package but could not connect to SQL Server from nodejs
Here is my code for index.js file using sequelize
const express = require('express');
const app = express();
const Sequelize = require('sequelize');
const sequelize = new Sequelize("demo", "demoUser", "dPass", {
    host: "localhost",
    dialect: "mssql",
    pool: {
        max:  1,
        min: 0,
        idle: 5000,
        acquire: 5000
    },
    dialectOptions: {
        encrypt: true
    }
});
sequelize
    .authenticate()
    .then(() => {
        console.log("connection established");
    })
    .catch(err => {
        if (err) {
            console.log(`unable to connect database Error ${err}`);
        }
    });
app.listen(3000, (err) => {
    if (err) throw err;
    console.log("Server connect to port 3000");
})
   
 
    