Skip to content

docs: rewrite database integration guide around modern drivers and best practices - #2477

Open
bjohansebas wants to merge 2 commits into
mainfrom
guide/database-integration-rewrite
Open

docs: rewrite database integration guide around modern drivers and best practices#2477
bjohansebas wants to merge 2 commits into
mainfrom
guide/database-integration-rewrite

Conversation

@bjohansebas

Copy link
Copy Markdown
Member

Replace the outdated per-database driver catalog (deprecated packages, callback-era APIs) with a single modern example using node:sqlite in cjs, mjs, and ts variants, links to the official docs of other popular drivers, an overview of ORMs and query builders, and a best practices section covering connection pooling, parameterized queries, credentials, error handling, request cancellation with req.signal, and graceful shutdown.

…st practices

Replace the outdated per-database driver catalog (deprecated packages,
callback-era APIs) with a single modern example using node:sqlite in
cjs, mjs, and ts variants, links to the official docs of other popular
drivers, an overview of ORMs and query builders, and a best practices
section covering connection pooling, parameterized queries, credentials,
error handling, request cancellation with req.signal, and graceful
shutdown.
@bjohansebas
bjohansebas requested a review from a team as a code owner August 2, 2026 19:32
@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit bd1ac76
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a6f9c55157b9800085086c7
😎 Deploy Preview https://deploy-preview-2477--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🔴 down 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@crandmck crandmck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small wording suggestion. Also, it looks like link checking CI is failing.


import Alert from '@components/primitives/Alert/Alert.astro';
import PackageManagerCommand from '@components/patterns/PackageManagerCommand/PackageManagerCommand.astro';
Express doesn't include database support out of the box, and it doesn't need to. Connecting a database to an Express app is just a matter of loading an appropriate Node.js driver or ORM in your app. This page shows the general pattern using SQLite as an example, points you to the official documentation for other popular databases, and covers a few practices that apply no matter which database you choose.

@crandmck crandmck Aug 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Express doesn't include database support out of the box, and it doesn't need to. Connecting a database to an Express app is just a matter of loading an appropriate Node.js driver or ORM in your app. This page shows the general pattern using SQLite as an example, points you to the official documentation for other popular databases, and covers a few practices that apply no matter which database you choose.
To connect a database to an Express app simply load the desired Node.js driver or ORM in your app. The general pattern is shown below using SQLite as an example.
There are also a few [best practices ](#best-practices) to follow, regardless of the database you're using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants