patricksaw / layer0-nextjs-isr-ssr-ssg-tester

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Getting Started

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

Open http://localhost:3000

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)

Learn More

To learn more about Layer0, sign up for a free account

To learn more about Next.js, take a look at the following resources:

About

License:MIT License


Languages

Language:JavaScript 72.6%Language:CSS 27.4%