This is a demo of a NextJS application with Server-Side Rendering (SSR).
It is hosted on Netlify.
Server-side rendering is handled by Netlify Functions.
Minimal configuration is required.
Everything is handled by the next-on-netlify npm package.
This page is server-side rendered.
It fetches a random list of five TV shows from the TVmaze REST API.
Refresh this page to see it change.
Dynamic pages, introduced in NextJS 9.2, are fully supported.
Click on a show to check out a server-side rendered page with dynamic routing (/shows/:id).
You can even take advantage of NextJS catch-all routes feature.
Here are three examples:
next-on-netlify automatically determines which pages are dynamic and which ones are static.
Only dynamic pages are server-side rendered.
Static pages are pre-rendered and served directly by Netlify's CDN.
Check out the source code on GitHub.