Can anyone help me how to connect to a mssql database


I have created a desktop app with electron.
I have the database details to connect but not sure how to connect from my app.
I have a button from where if I need to click to connect to DB and get the data to display on a block.

Thanks in advance.
Appreciate your help.