mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Description Follow up #38410. Some examples remain the multiple commands in a single block, and we couldn't use copy button to select one line. With this change users would be able to copy the command (using their choice package manager) with a single click using the github copy feature. CC: @samcx ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
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 the example using Vercel or preview live with StackBlitz
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