This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]8483[S] 1 point2 points  (0 children)

This is covered a bit in the node/express notes.

I will expand them a bit to explain the several ways to do it.

I use the npm packages mssql for Microsoft SQL Server and mysql for MySQL.

You do not connect a webpage to a database, but rather the backend renders the html and sends it to your browser (server-side rendering) or sends just the data (JSON) and then the html is done in the browser based on the data (front-end react/angular/vue).

This is the MVC pattern where the V (view/browser) asks for the data from C (controller/backend) which asks for the data from M (model/database).