Skip to content

docs: add router callable API#2441

Open
vibhor-aggr wants to merge 1 commit into
expressjs:mainfrom
vibhor-aggr:docs/router-callable-api
Open

docs: add router callable API#2441
vibhor-aggr wants to merge 1 commit into
expressjs:mainfrom
vibhor-aggr:docs/router-callable-api

Conversation

@vibhor-aggr

Copy link
Copy Markdown

Summary

Closes #1151.

Adds API documentation for the callable router(req, res, [next]) middleware interface in both the Express 4.x and 5.x Router API pages.

The new section documents:

  • the req, res, and optional next parameters
  • that Express uses this callable form when routers are mounted with app.use() or router.use()
  • how control and errors are passed through next() / next(err)

Verification

  • npx prettier --check src/content/api/4x/api/router/index.mdx src/content/api/5x/api/router/index.mdx
  • npx cspell --no-progress src/content/api/4x/api/router/index.mdx src/content/api/5x/api/router/index.mdx
  • npm run lint -- src/content/api/4x/api/router/index.mdx src/content/api/5x/api/router/index.mdx
  • git diff --check
  • npm run build

@vibhor-aggr vibhor-aggr requested a review from a team as a code owner July 11, 2026 06:55
@netlify

netlify Bot commented Jul 11, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 5cbf8b4
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a51e8fad6b772000853e74f
😎 Deploy Preview https://deploy-preview-2441--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: 97 (no change 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.

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.

Add API docs for router(req, res, [next])

1 participant