rsnext/examples/with-next-offline
Tanmay Laud f00ad581a1
Added .gitignore to examples that are deployed to vercel (#15127)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-07-16 10:52:23 -04:00
..
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
public Typo in with-next-offline example manifest.json (#9472) 2019-11-20 10:39:30 -06:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
next.config.js De-experimentalize custom-routes (#14602) 2020-06-27 09:18:18 +00:00
package.json Support static export and server hosted build and update docs (#9783) 2019-12-31 10:15:06 -05:00
README.md Suggest npx over npm init (#13637) 2020-06-01 17:36:57 +00:00

next-offline example

This example demonstrates how to use the next-offline plugin It includes manifest.json to install app via chrome

How to use

Using create-next-app

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

npx create-next-app --example with-next-offline with-next-offline-app
# or
yarn create next-app --example with-next-offline with-next-offline-app

Download

Download the example:

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

Install dependecies

npm install
# or
yarn

Build

Static export

npm run export
# or
yarn export

To serve it yourself, you can run:

npx serve -s out

Server hosted

npm run build
# or
yarn build

To serve it yourself, run:

npm start
# or
yarn start

Deploy

Deploy it to the cloud with Vercel (Documentation).