next.js icon indicating copy to clipboard operation
next.js copied to clipboard

docs: remove deprecated url.parse() from custom server example

Open DeveloperViraj opened this issue 2 weeks ago • 2 comments

This PR updates the custom server documentation to remove usage of Node's deprecated url.parse() API. The example does not require URL parsing, since the parsedUrl argument is optional for the Next.js RequestHandler.

Removing url.parse() avoids Node deprecation warnings (DEP0116, DEP0169) and keeps the example aligned with current best practices.

What changed?

  • Removed the url.parse() import and usage.
  • Removed unused parsedUrl variable.
  • Updated both TS and JS examples to use handle(req, res) directly.

Why?

  • url.parse() is deprecated in modern Node versions.
  • The example works without URL parsing.
  • Simplifies the docs and matches recommended APIs.

Fixes #86951

DeveloperViraj avatar Dec 09 '25 12:12 DeveloperViraj

Allow CI Workflow Run

  • [ ] approve CI run for commit: 47c8bdee374d7d112690b3cde35362d79022e10e

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

nextjs-bot avatar Dec 09 '25 12:12 nextjs-bot

Allow CI Workflow Run

  • [ ] approve CI run for commit: 47c8bdee374d7d112690b3cde35362d79022e10e

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

nextjs-bot avatar Dec 09 '25 12:12 nextjs-bot