[Maximilian Schwarzmuller] So now that we know
how we can build our site and what the implications are,
let's take a look at
general deployment steps and considerations,
no matter how you will build your site.
The first step should always be
that you double-check all your pages,
you make sure you added all the head metadata
to all your pages, titles, descriptions,
whatever else you might need.
Of course, you wannna optimize your code,
remove console log statements,
shrink it as much as possible, things like that.
And you wanna remove unnecessary dependencies
and make your code as small and optimized as possible.
So that is step number one.
Now once you did that, there is another kind of related step
which I still wanna list as a separate step.
You wanna double-check your configuration,
and you especially wanna consider
working with environment variables
for data that might not be the same during development
and during production.
For example, in our blog application
we have an API route where I connect to a database,
and, at the moment, the way I connect here
is always the same.
My connection string is hard-coded in the API route,
so I always use the same user,
the same cluster, the same database.
It's more realistic that I want to use
some development dummy database during development
and switch to a different database
and maybe also an entirely different cluster and user
for production.
And, therefore, we want to swap
this connection string dynamically,
depending on the environment in which we're running.
And that is something where environment variables
will be able to help us.
Another use case could be API keys.
If you're using the Google Maps SDK, for example.
These are things which you might wanna manage
with environment variables.
And therefore, that is, of course, also something
we're going to explore in this course section.
Now once you did all of that, you should to do a test build
and test your production-ready app on your local machine.
Since you just need a node server for running it,
and we already have Node.js installed,
building and running the application
is rather straightforward.
And we should do that to make sure that everything works,
that we're happy with the file sizes,
with the code bundle sizes, and so on.
Now that step, of course, can involve
that you go back to step one
and implement further optimizations.
Now once you're happy with all of that,
then it's time to finally deploy.
That is roughly how the deployment process will look like.
And that, therefore, is the process and the list
we will go through over the next lectures.