Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.54 KB

File metadata and controls

25 lines (16 loc) · 1.54 KB

Static export example with TypeScript

This example shows how to use Next.js's Static Generation feature to export to static HTML files your Next.js application, fetching data from an API to generate a dynamic list of pages.

This is a TypeScript version of the with-static-export example.

When trying to run npm start it will build and export your pages into the out folder and serve them on localhost:5000.

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

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

npx create-next-app --example with-static-export-typescript with-static-export-typescript-app
# or
yarn create next-app --example with-static-export-typescript with-static-export-typescript-app
# or
pnpm create next-app --example with-static-export-typescript with-static-export-typescript-app