We configured Next.js to export
our app as a static website.
This way the build generates
a folder called "out",
that contains all the HTML and other static files.
At this point we can take this folder,
upload it to any web server,
and we'll have a public website.
You can either set up your own web server,
or use one of the many hosting
providers available out there.
Just as an example, in this
video I'll use Netlify,
that's a platform with many features,
a bit like Vercel,
but among other things it lets
you create a new site,
simply by uploading some local files.
If you sign in to Netlify,
you'll have this dashboard
where you can manage your sites.
You can import a Git repository, just like Vercel.
But there's also an option to deploy manually,
by uploading a folder using drag and drop.
So that's what I'll do now:
literally take the "out" folder generated
by the Next.js export,
and drag it into the upload area.
This will automatically create a new site.
And the deployment succeeded!
Let's close this popup,
and on this page we see our project settings.
It automatically generated a (rather
weird) name for our site.
We should be able to change it in "Site settings".
There's a "Change site name" button here.
Let's see if we can call it
"next-reviews" instead.
It will be under the "netlify.app" domain.
That name was free.
So our website is now at "next-reviews.netlify.app".
Let's open that URL.
And this is our static website,
with all the pages working as expected.
That's how easy it is to deploy
a static site to Netlify.
Now, of course in a real project
you may want to set up a custom domain,
rather than running it as a
"netlify.app" subdomain.
And you can do that by following step 2.
But I'll stop here for this example.
Once again, I used Netlify in this video
but there are many other platforms where
you can host a static website.