I recently cloned my existing node backend repo that worked properly about 3 months ago but now I can't connect my neither local nor remote MSSQL DB while I'm trying to call my endpoint in locally deployed backend below error occurred. I could use MSSM (Microsoft SQL SERVER MANAGEMENT) to connect to my DB using same credentials
These are the dependencies of my project
My Tedious connection config object
Environment variables (.env file)
I have tried upgrading my dependencies to latest, enabling TCP/IP of SQL server, also tried remote MSSQL server, tried to deploy and call the endpoint in different machine neither of them worked for me always the same error throw form backend.
Please refer to the Docker documentation, Declare default environment variables in file:
Each line represents a key-value pair. Values can optionally be quoted.
VAR=VAL
->VAL
VAR="VAL"
->VAL
VAR='VAL'
->VAL
You will notice that there are no comma ,
characters in the examples. Instead of your .env
file containing the following:
DB_HOST="localhost",
DB_USER="admin",
DB_PASSWORD="Admin123",
It should contain the following instead (note: no commas):
DB_HOST="localhost"
DB_USER="admin"
DB_PASSWORD="Admin123"