We now have a full crud example put together with react and read us so we can see a list of records
we can create a new record we can edit that record and then we can go ahead and delete it if we want
to.
And of course we can show a individual record as well.
These are the basic operations that are included for the vast majority of web apps out there just about
every app as we discussed much earlier on has these very basic operations around reading showing listing
all that kind of good stuff different records.
So at this point this application for the most part is complete and I would encourage you to do a get
commit if you're making use of get or even just copy the project directory and just have all the code
we've put together as a backup so that you can reference it in the future because what you see right
here is a pretty good base for creating any application you might want to work on.
So at this point moving forward we're going to start continuing on the streaming aspect of this application.
Now remember the streaming part is 100 percent optional and a lot of what we're going to do here is
not really related to react in redux at all.
I just want to complete the application I told you we were going to build but going to the string stuff
is not at all a requirement for underthings understanding how react and redux works to that end.
If you have any trouble going through the streaming stuff and getting it to work I'm probably not going
to offer you a lot of support for troubleshooting issues because again this is just not really relevant
for the course.
I just want to make sure that we can complete the example nonetheless.
Okay.
So we're gonna start working on the streaming aspect of the supplication now.
So let me tell you about exactly what we need to do.
I guess we looked at this diagram previously.
Remember we had said that we were going to develop that API that had a list of streams and we've already
gone through that process and our web application running inside of a browser has the ability to list
out those different streams create new ones and do all that good stuff.
So now the next thing we're going to do is set up this RCMP server which is going to be responsible
for receiving different video streams and broadcasting them out to different users browsers.
Now remember I had told you setting up this RTM RCMP server was going to be really easy and straightforward
and that's not a lie at all.
It really will be very simple to put together.
So here's what we're going to do.
I'm going to flip on over to my terminal where I'm inside of my client directory right here.
So remember the client folder is where we have put together all the react and redux parts of our application.
So I'm going to go up one level and out here I've got the API project and the client project as well.
So inside of this folder inside of the streams overall general project folder I'm going to make a new
folder called Arti MP server like zone and then I'm going to change into that directory and inside of
there I'm going to generate a new package not just on file with NPM in it.
Once I run NPM minute I'll be prompted for a couple of different inputs and I'm going to hit enter to
go through each of them and I eventually get kicked back out to my terminal.
OK so now we've generated a package not just on file.
Let me tell you about how we're going to put that server together.
All right.
So I've got some documentation on here on the screen or a link to some documentation for the RCMP server
that we're going to make use of.
So I'm going to open up a new browser tab and navigate to that link.
All right so this is a no js implementation of a RCMP server and this is how we are going to eventually
stream video from a program like say OBSS member that's open broadcaster over to the RCMP server making
use of the node media server package is really easy and straightforward as a matter of fact we're just
going to take the default example that you can see if you scroll down a little bit and find the usage
section.
So underneath the usage section you'll see NPM version right here and it says single core mode.
So there's a single core mode and a multi-core cluster mode.
We're going to use single core because we do not really expect to have a lot of traffic on this RCMP
server that we are putting together.
So essentially all we have to do is install this package node media server and then you and I are going
to run exactly the code you see right here.
We're not going make any changes to it.
We're just going to use the base default configuration.
All right so I'm going to flip back over to my RCMP server directory and over here I'm going to run
NPM install dash dash save node dash media dash server Lexa and then well that runs I'm going to also
open up my code editor inside of that RCMP server directory.
So I've got a new code editor open here inside of RCMP server.
There's the package on file that we just created and there's the node modules directory where our packages
are currently being installed.
So inside if you're going to create a new file called index dot J.S. I'm going to go back over to the
Get help repository copy this example code right here.
And then paste it inside the index not just file
and then going to save this file and then to start up our project.
I'm going to open up the packaged case on file and I will add in a new script inside of your and replace
the existing test script to start up our project.
So I'm going to delete test and I'm going to add in a new script called start anytime we run that script.
We're going to run node index Dutch.
Yes like the OK.
And that's pretty much it.
So now if I flip back over to my terminal I should see my package is finished installing the node medius
server package.
So inside of our server I'm going to run NPM starts and that's going to start up our streaming server.
So I should see a message like this node media server whatever version you are running.
And then we'll see some other output in here over time.
So now our server for streaming is running on port eight thousand.
OK.
So this looks pretty good.
So let's take a quick pause right here.
When we come back the next section we're going to start to configure our OBSS software to or whatever
streaming software you're using to stream to the server.
So quick pause and I'll see you in just a minute.