rsnext/examples/with-static-export
2020-05-27 17:51:11 -04:00
..
components Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
package.json Remove isomorphic-unfetch from examples (#12948) 2020-05-15 22:23:55 +02:00
README.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00

Static export example

This example show how to export to static HTML files your Next.js application fetching data from an API to generate a dynamic list of pages.

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

How to use

Using create-next-app

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

npm init next-app --example with-static-export with-static-export-app
# or
yarn create next-app --example with-static-export with-static-export-app

Download manually

Download the example:

curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-static-export
cd with-static-export

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev