So i made a simply express server connected with a database. On localhost it connects with database perfectly but on deployment it shows an error like that
{"code":"ESOCKET","originalError":{"code":"ESOCKET"},"name":"ConnectionError"}
On sql Server everything is set perfectly.
my configuration looks like that:
const config={
user: 'xxxxx',
password: 'xxxxxxx',
server: 'public_ip_from_sql',
database: 'data_base',
debug:true,
port: 1433,
client:"mssql",
options: {
encrypt: false,
enableArithAbord:true,
trustServerCertificate: true,
validateBulkLoadParameters:true,
},
connectionTimeout:150000,
pool:{
max:10,
min:0,
idleTimeoutMillis:3000
}
}
I am hosting it on Plesk nginx server. i havent find any solution to solve this problem.