Before we start working on the project let me quickly have a look at rest your eyes and the over knowledge
you gained from the course is that now all redundant we learn about things like setting up our node
and express app routing handling requests responses request validation database communication file handling
uploads downloads sessions and cookies and often dictation.
These are some big topics we covered for the course.
Now how do we have to adjust our knowledge.
Now did we build a restful API instead of a view based application.
Well regarding the general setup we already saw that in the last module there are no changes we need
to do.
We still set up our normal node and express server regarding the routing.
We also have no significant changes.
We just use more HTP methods more HTB works now.
That's the only difference in the end for handling requests and responses.
You already learned that.
Now we work with Jason data instead of the use.
So that is a difference we render no use anymore.
We have no use Folder anymore we don't use Ejay as handlebars or anything like that.
Instead we only exchange data so there is a change.
But as you learned in the last module This is also not too hard to implement.
Now if you want to add validation for incoming request data then we will not have to change anything.
We still can add validation for example with Express validator which we used in the validation module
of this course and the way we use it and the logic behind it does not change a single bit.
Database communication.
So working with database B that a sequel or no sequel database also does not change.
This happens on the server side in controller action typically and the logic we write dare the code
we write there is not affected by the data we exchange or by the fact whether we render a view or if
we send around Jason data when we talk about file uploads downloads and so on.
There's also not much to change.
On the service side nothing changes actually on the client side.
The logic changes a little bit and I will show you how we can implement file upload and of course also
serving files in this module.
Now for sessions and cookies there we have changes because we will not use sessions and cookies anymore
with rest.
API eyes are the reason for that simply is that you learned about these restful principles or rest API
principles and one of them was that each request is treated separately.
It is looked at independently from previous requests so we have no connection between the client and
server.
We have no shared connection history to be precise and therefore we managed no sessions on the server
because the rest API does not care about the clients or whether that client connected to the API before
and therefore authentication will also have to change.
We'll use a different authentication approach and I'll show you which approach does this and how to
implement it in this module too.
So overall there are not too many changes.
Some changes.
The biggest changes are related to sessions and they are for authentication and I will show you how
to implement them but the rest will still work the same you learn that and for all the knowledge you
gained from the Course is of course everything but redundant.
It's still super important.
And with that let's dive in.
Let's see which project will be working on and how we can work on it.