This is a Next.js project based on example code created by idoshamun - it is a simple NextJS app running on Layer0 that retrieves data from random Public APIs and does ISR, SSG, and SSR. The goal is to use this as a debugging tool.
First, install the Layer0 CLI:
npm i -g @layer0/cli@latest
Install packages
npm i
or
yarn
Then run the Layer0 development server:
0 dev
the /isr
path runs NextJS ISR
the /ssg
path runs NextJS SSG
the /ssr
path runs NextJS SSR
routes.js
defines the routes and caching rules for Layer0
layer0.config.js
defines the Layer0 connector being used (NextJS)
To learn more about Layer0, sign up for a free account
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.