So, I suppose that even if Tedious allows you to include the instance name in the "parameters", it either does not use it or cannot use it, since it should be used. After some research on what should happen when you give SQL Server an instance name, it redirects you from port 1433 to the dynamic port that it uses for that instance. I did not know that it uses a dynamic port, but if your instance is named, the port will always be dynamic. I do not know where I saw his broadcast in 1433, it was my mistake.
To check the dynamic port, see here:

From this information, I changed the code to this:
var config = { userName: 'username', password: 'password', server: 'XXXXX', options: { port: 49175, database: 'databasename', instancename: 'SQLEXPRESS' } };
Now everything is fine, I hope this helps someone.
loganhuskins
source share