All right.
And the first fix that we have for our course, our duty is installing a course package on our express
server.
So pretty much there's package for everything, of course, is not an exception.
So if you want to find out more info.
I left here a link and effectively the idea is following again, we installed the package, which I'm
going to do right away, so I'll stop it and then I'm going to go ampm and then start work.
Sort of what am I doing?
Why am I restarting the server without installing the package?
My apologies.
Let me grab this code.
What installed the package again, like I said in the previous video?
Technically, this is going to be a temporary fix and we'll use the proxy fix instead.
So if you don't want to follow along, if you don't want to install the package, then you don't have
to do that.
Just kick back and relax and watch me struggle.
Now it would be a better idea if I were to tell you that before I stopped serve, but hopefully you
didn't waste too much time on that.
So I'm going to go with npm starts now.
I'm restarting the server and essentially the most straight up approach has fallen away.
Just get the package and then I use it as a middleware, so I would go with I'm not used and would go
with the course.
Now there are some configuration options that I will very quickly discuss in the next video, but not
for now.
Let's just import and set it up on our server so we can successfully get the data on the frontend.
So let me close the terminal.
We are looking for server, so and then again, I will remove it so might as well do that.
The top can be easier to find it.
So course from and we're looking for a course package.
We get the import and then above the express address on, I'm going to go with that.
And let's go with the course.
Let's save it.
And now, if I go back to the dashboard and again, as I say, no, I'll just come on this one out because
I do want to discuss the four slash in next video or set up the proxy, and I think it will help you
to understand it better if I leave this data JSON example here.
So let me just come on down one out and uncommon the 5000 and everything is correct.
We're actually getting data is just, you know, our response is simple string.
And here I'm looking for address on.
So let me quickly fix this where instead of going with samples and I'm going to go with JSON again,
this is dummy doesn't really matter how I structure it.
And let's just set it up as an object here.
And then I'm going to go with the message and I'll set it equal to my welcome.
So a little bit of trickery effectively in order to get rid of that error.
So I refresh and water, you know, I have message equal to your welcome, and hopefully this clearly
showcases that everything works.
We just need to install the course package.
Set it up as our middleware on the server.
One more time on the server.
All of this is happening and not on the frontend will successfully be able to fetch the data, which
essentially is how we'll build this project.
All the resources are going to be located on a server and then from the frontend will just make fetch
requests be ability because or Ajax requests, however you want to call them and then use the data to
build our application.