1 00:00:01,020 --> 00:00:03,460 In this video we're going to start to set up Jace on server. 2 00:00:03,510 --> 00:00:08,370 Now I said on this diagram right here and in the last video that setting up Jason server is really easy. 3 00:00:08,580 --> 00:00:09,980 And that's kind of true. 4 00:00:10,050 --> 00:00:14,280 Normally setting up Jason server by itself very easy very straightforward. 5 00:00:14,280 --> 00:00:18,190 However using With React Native is a little bit more complicated. 6 00:00:18,210 --> 00:00:19,710 Let me help you understand why. 7 00:00:20,200 --> 00:00:20,460 OK. 8 00:00:20,460 --> 00:00:23,790 This right here is a diagram of what's going on with our expo bundler. 9 00:00:23,880 --> 00:00:26,570 When we're running code on our physical phone. 10 00:00:26,670 --> 00:00:32,400 So you've got your physical phone and it's communicating with your computer over a Wi-Fi network. 11 00:00:32,410 --> 00:00:37,650 Remember it's only communicating over a Wi-Fi if you were able to get this land setting back over here 12 00:00:37,650 --> 00:00:38,590 working. 13 00:00:38,700 --> 00:00:42,720 If you're instead of using the tunnel system then it's a slightly different mechanic but it's still 14 00:00:42,720 --> 00:00:49,470 more or less quite similar so we want to have our computer right here running some Jason server. 15 00:00:49,470 --> 00:00:54,990 And we wanted to serve some information to our React Native application running on your physical phone. 16 00:00:54,990 --> 00:01:00,930 The problem is that it's kind of hard to get your phone to very easily talk to that Jason server without 17 00:01:00,930 --> 00:01:04,210 you doing a little bit of configuration on your computer itself. 18 00:01:04,350 --> 00:01:09,390 You would have to look up your IP address and it's entirely possible that you might not be making use 19 00:01:09,390 --> 00:01:12,200 of your Wi-Fi network to connect these two things. 20 00:01:12,330 --> 00:01:16,070 Like I just said you might be instead using tunnel over here. 21 00:01:16,070 --> 00:01:17,690 So I'm going to show you a solution to this. 22 00:01:17,700 --> 00:01:20,080 That's going to work no matter what. 23 00:01:20,160 --> 00:01:25,440 So you can get this working very easily you can get your phone to talk to your computer and communicate 24 00:01:25,440 --> 00:01:29,750 with some server that you're running on your Mac computer without doing any additional setup. 25 00:01:30,180 --> 00:01:34,520 But I'm going to give you a solution that's going to work just 100 percent of the time. 26 00:01:34,620 --> 00:01:36,360 So here's what we're going to do. 27 00:01:36,480 --> 00:01:42,570 We're going to install a little tool on our local machine called and grok this is a server that essentially 28 00:01:42,630 --> 00:01:48,300 makes your computer and or services that you run on your computer available to the outside world. 29 00:01:48,360 --> 00:01:53,400 And so you're going to very easily be able to setup your phone to communicate with your server running 30 00:01:53,400 --> 00:02:00,330 on your computer unit using this and grok thing at the end of the day it's essentially just one extra 31 00:02:00,420 --> 00:02:02,340 tiny little step that we have to go through. 32 00:02:02,400 --> 00:02:03,980 That's pretty much it. 33 00:02:03,990 --> 00:02:04,230 OK. 34 00:02:04,230 --> 00:02:11,070 So then mind let's get started setting up our Jason server so going to flip on over to my terminal not 35 00:02:11,070 --> 00:02:11,790 there. 36 00:02:11,790 --> 00:02:12,920 Here we go. 37 00:02:13,140 --> 00:02:18,690 And then I'm going to exit out of my blog directory so I can go up one folder some back in the side 38 00:02:18,720 --> 00:02:20,840 of a workspace directory of sorts. 39 00:02:21,000 --> 00:02:25,800 Then inside of here I'm going to make a new project directory so I'll just make a new folder and we'll 40 00:02:25,800 --> 00:02:31,830 call it something like Jason server I'm then going to change into that directory and then I'll generate 41 00:02:31,860 --> 00:02:38,840 a new package that Jason File with NPM in it like so I'll then be asked a couple of questions here. 42 00:02:38,910 --> 00:02:45,020 I'm going to hit Enter Enter enter and eventually we get kicked back to our command line so that generated 43 00:02:45,050 --> 00:02:45,930 a new package. 44 00:02:45,950 --> 00:02:52,010 Jason File inside of here so we can now start to install some node modules the first node module we 45 00:02:52,010 --> 00:02:52,670 want to install. 46 00:02:52,700 --> 00:02:54,050 So we'll do an npm install. 47 00:02:54,170 --> 00:02:56,350 We're going to get Jason server. 48 00:02:56,540 --> 00:03:02,610 We're also going to install that tool called in grok as well it's going to run the install for both 49 00:03:02,610 --> 00:03:06,000 those are going to let this run install process run. 50 00:03:06,000 --> 00:03:10,190 And we'll take a quick pause come back to the next video and then start to set these two things up so 51 00:03:10,200 --> 00:03:11,930 quick pause and I'll see you in just a minute.