Build a Secure Node.js App With SQL Server

You might try comparing your code to this example’s code on GitHub.