In this video we're going to start to set up Jace on server.
Now I said on this diagram right here and in the last video that setting up Jason server is really easy.
And that's kind of true.
Normally setting up Jason server by itself very easy very straightforward.
However using With React Native is a little bit more complicated.
Let me help you understand why.
OK.
This right here is a diagram of what's going on with our expo bundler.
When we're running code on our physical phone.
So you've got your physical phone and it's communicating with your computer over a Wi-Fi network.
Remember it's only communicating over a Wi-Fi if you were able to get this land setting back over here
working.
If you're instead of using the tunnel system then it's a slightly different mechanic but it's still
more or less quite similar so we want to have our computer right here running some Jason server.
And we wanted to serve some information to our React Native application running on your physical phone.
The problem is that it's kind of hard to get your phone to very easily talk to that Jason server without
you doing a little bit of configuration on your computer itself.
You would have to look up your IP address and it's entirely possible that you might not be making use
of your Wi-Fi network to connect these two things.
Like I just said you might be instead using tunnel over here.
So I'm going to show you a solution to this.
That's going to work no matter what.
So you can get this working very easily you can get your phone to talk to your computer and communicate
with some server that you're running on your Mac computer without doing any additional setup.
But I'm going to give you a solution that's going to work just 100 percent of the time.
So here's what we're going to do.
We're going to install a little tool on our local machine called and grok this is a server that essentially
makes your computer and or services that you run on your computer available to the outside world.
And so you're going to very easily be able to setup your phone to communicate with your server running
on your computer unit using this and grok thing at the end of the day it's essentially just one extra
tiny little step that we have to go through.
That's pretty much it.
OK.
So then mind let's get started setting up our Jason server so going to flip on over to my terminal not
there.
Here we go.
And then I'm going to exit out of my blog directory so I can go up one folder some back in the side
of a workspace directory of sorts.
Then inside of here I'm going to make a new project directory so I'll just make a new folder and we'll
call it something like Jason server I'm then going to change into that directory and then I'll generate
a new package that Jason File with NPM in it like so I'll then be asked a couple of questions here.
I'm going to hit Enter Enter enter and eventually we get kicked back to our command line so that generated
a new package.
Jason File inside of here so we can now start to install some node modules the first node module we
want to install.
So we'll do an npm install.
We're going to get Jason server.
We're also going to install that tool called in grok as well it's going to run the install for both
those are going to let this run install process run.
And we'll take a quick pause come back to the next video and then start to set these two things up so
quick pause and I'll see you in just a minute.