Skip to content

Files

Latest commit

3766cff · Dec 1, 2020

History

History
This branch is 19239 commits behind vercel/next.js:canary.

custom-server-typescript

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 22, 2020
May 29, 2019
Jul 9, 2019
Dec 1, 2020
Aug 30, 2020
Jul 9, 2019
Feb 21, 2020
Aug 30, 2020
Sep 16, 2019
May 23, 2019

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/index.ts in development and dist/index.js in production. The second directory should be added to .gitignore.

How to use

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

npx create-next-app --example custom-server-typescript custom-server-typescript-app
# or
yarn create next-app --example custom-server-typescript custom-server-typescript-app