Files
MOHAMMED WASIM KHAN 3ab9d196ab fix: remove deprecated url.parse() from custom-server example (#96105)
Fixes #86951

Removes the deprecated legacy `url.parse()` API (DEP0169) from the
custom-server example. The `parsedUrl` parameter is optional, so the
simplest fix is to remove the `parse()` call and pass only `(req, res)`
to the handler, matching the docs code block that was already updated in
#86986.
2026-07-24 00:04:08 +02:00
..
2025-04-23 20:48:58 -05:00

Custom server with TypeScript + Nodemon example

The example shows how you can use TypeScript on both the server and the client while using Nodemon to live reload the server code without affecting the Next.js universal code.

Server entry point is server.ts in development and dist/server.js in production. The dist directory should be added to .gitignore.

Deploy your own

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example custom-server custom-server-app
yarn create next-app --example custom-server custom-server-app
pnpm create next-app --example custom-server custom-server-app