Static Site Generation (SSG) with Next.js | MDN Blog
Briefly

For illustration, we'll use static generation in our app but fetch some data at build time. This way, we will build a flexible website while still benefiting from deploying static pages.
Our Next app uses port 3000, so we can enable incoming traffic via only this port using UFW.
You can view the application at http://<server-ip>:3000/posts to see what we're generating at this point.
For fetching data, getPosts() sends a GET request to a URL that serves placeholder data. You might not make fetch requests in your application; you might instead get some information from data.
Read at MDN Web Docs
[
|
]