WEBVTT

00:00.240 --> 00:04.640
All right so moving right along here we've established we're working with no genius.

00:04.740 --> 00:07.630
Now we need to set up our environment so that we can do that.

00:07.650 --> 00:10.150
Fortunately cloud 9 makes it really really easy.

00:10.350 --> 00:15.130
It's basically a single button press maybe two and we have a node environment ready to go.

00:15.210 --> 00:19.570
One thing before I do that I do want to talk a bit about what the Course is and isn't.

00:19.770 --> 00:25.200
Yes I know it seems like I'm leaving that a bit late but really what I'm talking about is that this

00:25.200 --> 00:28.770
is not a no G-S course is not going to be comprehensive.

00:28.770 --> 00:33.110
This is not going to teach you you know a tenth of what you would want to know about no.

00:33.150 --> 00:34.270
Yes.

00:34.590 --> 00:36.820
If you want it to be a no just developer.

00:37.020 --> 00:43.320
This is not an issue Tim oleracea says or you know bootstrap or whatever tools we use is not a course

00:43.380 --> 00:44.360
on those tools.

00:44.400 --> 00:46.040
They are helping us.

00:46.040 --> 00:49.680
They're serving a purpose which is to make an app with my s.

00:49.690 --> 00:55.650
Q outside my school course and we're basically using those tools as needed to try and strike a balance

00:55.680 --> 00:56.830
as we go on here.

00:56.850 --> 01:02.050
I'm not going to just speed past and ignore you know explaining what certain things are.

01:02.100 --> 01:07.110
Just assume you know or assume that you don't care what a certain line of javascript does or what a

01:07.110 --> 01:08.220
line of C of S does.

01:08.400 --> 01:14.010
But I'm also not going to take the time to explain every single line to have you know challenging C

01:14.010 --> 01:17.830
assassinated him out and no genius exercises and so on.

01:17.940 --> 01:20.720
We're still going to have exercises around my as well.

01:20.910 --> 01:24.530
So I just want to throw that out there just to set your expectations.

01:24.600 --> 01:31.320
And also if there is a chance that you want a full course on those technologies I have a 45 plus hour

01:31.530 --> 01:37.280
course on those technologies that you can check out but you don't need that course to get through this.

01:37.290 --> 01:41.610
That's kind of the point I'm going to show you enough but I'm not going to spend 10 hours talking about

01:41.610 --> 01:42.570
a..

01:42.570 --> 01:43.050
OK.

01:43.200 --> 01:49.890
So with that said let's hop over to cloud nine and we're going to go to our main kind of dashboard.

01:49.890 --> 01:56.340
So not inside of the editor not inside the current environment but we're going to go to a dashboard

01:57.000 --> 02:02.250
and you can get there but it's going to see 9.00 signing in if you're not signed in and it will take

02:02.250 --> 02:02.760
you here.

02:02.890 --> 02:06.850
Now I have a bunch more and you probably have unless you've been playing around.

02:07.110 --> 02:13.150
But all that you need to do is click on Create a new workspace and we'll call it whatever you want I'll

02:13.150 --> 02:15.390
call this node and my ass.

02:15.390 --> 02:18.520
Q Well you can call it whatever you like.

02:18.790 --> 02:24.470
And then what we're going to do is down here this is the important part click node.

02:24.700 --> 02:26.320
So we could get away with any of these.

02:26.320 --> 02:28.530
We could install no japes ourselves.

02:28.540 --> 02:33.290
It's not actually terribly difficult if you want to install it yourself in your own machine.

02:33.310 --> 02:35.850
There are great instructions online.

02:36.070 --> 02:37.850
Just go to the no J s website.

02:37.870 --> 02:43.330
You basically just download a package but you're going to be doing this using Cloud 9 to make it very

02:43.330 --> 02:46.960
easy for all of us to be on the same page and that's it.

02:46.960 --> 02:52.310
No just give it a name create it will take a little bit.

02:52.420 --> 02:53.280
I'll use the magic editing.

02:53.290 --> 02:57.060
Fast forward through this and we're back.

02:57.400 --> 02:58.660
And this is what we see.

02:58.840 --> 02:59.980
So there's a couple of things.

02:59.980 --> 03:01.950
One we have a new environment here.

03:01.990 --> 03:04.130
None of our old files are here.

03:04.180 --> 03:09.460
None of our old databases that you know the books or whatever we've been working with customers orders

03:09.490 --> 03:11.550
that's not here it's not gone.

03:11.590 --> 03:14.080
You would just have to go back to that environment.

03:14.170 --> 03:19.910
But more importantly we have node installed here and we want to test that out to make sure.

03:19.930 --> 03:27.080
So what what cloud 9 does is they actually give you kind of a starter app that will just delete.

03:27.160 --> 03:30.060
But before we do that we'll just make sure it works.

03:30.250 --> 03:32.920
So they have instructed instructions if you want to try it.

03:33.130 --> 03:37.170
All that we have to do is type node server.

03:37.420 --> 03:38.070
Yes.

03:38.140 --> 03:41.060
And actually before I do that ignore my icemaker.

03:41.090 --> 03:41.910
It's very noisy.

03:42.130 --> 03:45.210
If we just do ls All right we see we have server.

03:45.230 --> 03:47.750
Yes let's just open it.

03:48.050 --> 03:50.490
There's code in here that we didn't write.

03:50.500 --> 03:52.030
We're going to get rid of all of it.

03:52.540 --> 03:54.540
And there's my fridge now boy.

03:54.610 --> 03:56.650
So noisy.

03:56.830 --> 03:58.150
Hopefully they're done now.

03:58.150 --> 04:00.480
So we've got you know all this code that we didn't write.

04:00.490 --> 04:01.260
This is node.

04:01.300 --> 04:02.320
This is javascript.

04:02.350 --> 04:04.310
We'll be getting to stuff like this.

04:04.330 --> 04:05.700
We're not going to make a chat app.

04:05.710 --> 04:08.770
That's what this is but we'll be working on something similar.

04:09.040 --> 04:18.130
So now if we do node server J.S. and I hit Enter we should get something like this chat server listening

04:18.130 --> 04:21.040
at 0.0 Bob La 88.

04:21.360 --> 04:21.820
OK.

04:21.970 --> 04:23.360
So that's the first thing.

04:23.590 --> 04:29.470
If you get that that means that node is working if you get something like error or command not found

04:29.530 --> 04:32.580
node that means that no it's not installed.

04:32.710 --> 04:38.290
And I highly doubt you would ever get that if you had created a new workspace and done this kind of

04:38.320 --> 04:39.510
the way that you're supposed to.

04:39.670 --> 04:43.810
But if you're just working on your computer or you're working in a different cotinine workspace that

04:44.020 --> 04:49.780
isn't set up with node and you try and type node then you'll get an error and then the next thing to

04:49.780 --> 04:52.630
discuss is OK we have our app running.

04:52.720 --> 04:54.660
We started a server.

04:54.810 --> 04:59.760
Now how do we interact with the app which is something we'll be doing once we create our web app we'll

04:59.790 --> 05:01.930
start it up but we'll need to view it.

05:02.100 --> 05:07.670
You can actually click on this preview button and just go to preview running application.

05:07.830 --> 05:08.930
And here it is.

05:09.120 --> 05:11.510
Or you can also just copy this you are.

05:11.940 --> 05:15.870
Like to keep it in a separate tab and just paste that in.

05:16.110 --> 05:18.800
And we have a chat app now if we wanted to.

05:18.810 --> 05:27.890
This isn't part of the course this is not important that you understand but you can send it and you

05:27.890 --> 05:32.220
can do this in two windows.

05:32.230 --> 05:40.670
Now we have no cult and anonymous I can decide on a name it's my cat and my cat says meow.

05:41.050 --> 05:42.060
Go away.

05:43.160 --> 05:44.330
Send that anyway.

05:44.370 --> 05:46.150
You can see we have a chat app working.

05:46.260 --> 05:52.060
Here's a simple web app that we didn't create but is running with node and that's important.

05:52.380 --> 05:53.010
OK.

05:53.370 --> 05:58.850
So we can stop it using Control-C just like we could stop the madness.

05:58.850 --> 06:03.540
Q LCL and that's where I'm going to end this video for now.

06:03.540 --> 06:06.860
Next we're going to do sort of a five minute crash course on Snoad.

06:07.140 --> 06:11.300
But for now what we talked about was creating the node environment.

06:11.520 --> 06:17.250
We have this environment and then we talked about how if we have a server running we can preview it

06:17.550 --> 06:22.860
by clicking on Preview or we can open it in a separate you are in a separate tab or window.

06:23.430 --> 06:24.840
One thing to note I stopped it.

06:24.870 --> 06:28.640
So if I try and refresh the page now I get an error.

06:28.680 --> 06:29.920
There's no application running.
