0:00:22
what is going on guys welcome back to
0:00:25
another session of brewery breaking fix
0:00:30
fantastic uh and hope you guys are
0:00:34
having a really good weekend
0:00:37
and if you're in melbourne australia you
0:00:40
must be real feeling really boring
0:00:42
because is that it was a heat wave
0:00:48
how is it whether they're tauri
0:00:54
i like that i'm perfect
0:00:56
it is actually very nice like this
0:01:00
yeah it's breezy and comfortable and
0:01:02
it's a nice like quiet weekend day
0:01:15
you're just making me feel really
0:01:17
jealous i actually want to move to bali
0:01:24
um all right guys uh so
0:01:26
before we get started into some action
0:01:29
let's get the acknowledgement of the
0:01:33
and respect for our elders
0:01:35
i begin today by acknowledging the
0:01:37
traditional custodians of the land on
0:01:40
which we gather today and pay my
0:01:42
respects to the elders past present and
0:01:44
future i extend their respect to
0:01:47
aboriginal and torres strait islander
0:01:53
fantastic so that is all out of the way
0:02:06
my dog is my dog is biting people
0:02:14
give him some food man
0:02:16
yeah i just fed him he gets really
0:02:18
excited when he's gonna go for a walk so
0:02:20
he'll start he'll start like start like
0:02:28
cool um so yeah just to give a bit of a
0:02:36
on friday we did um
0:02:41
removing the connection id from the
0:02:47
no sorry that was on thursday on friday
0:02:50
we did as in yeah we
0:02:54
worked on connecting the clients
0:03:01
websocket server and then also
0:03:06
oh what's happening to my brain yeah and
0:03:09
then we also made sure that when client
0:03:15
inserts the connection id in danmodiby
0:03:18
which was working fantastic um
0:03:27
try and send a message from our client
0:03:30
to the web server and that
0:03:34
would be our first step or
0:03:38
forward so the overall functionality
0:03:40
will probably be as in when we
0:03:43
send a message to the server it will
0:03:49
send that risk send the response to all
0:03:52
other users that are connected to the
0:03:54
websocket at that moment of time
0:03:58
does that make sense
0:04:03
so how about if you share
0:04:06
your screen story because you're way
0:04:09
than me in javascript uh especially
0:04:13
no i'm a c-sharp guy
0:04:19
do you know how to
0:04:24
hello world in c-sharp because i don't
0:04:26
know so maybe you could teach me
0:04:29
no i don't know anything about c sharp
0:04:32
being totally facetious there
0:04:35
how is c sharp though you like it you
0:04:39
j it's a really powerful
0:04:47
that's been really good um do you want
0:04:49
to share your screen baby
0:04:58
today i was working on then
0:05:02
on the new streaming software that i've
0:05:09
i'm re i i'm actually realizing i'm
0:05:11
really bad at this i find
0:05:14
designing as in graphical designing
0:05:21
me too unless it looks good
0:05:28
because um i was trying to
0:05:34
the themes just need to be imported but
0:05:37
the live coding screen
0:05:39
or the scene um has to be done from
0:05:43
scratch because it's for two people
0:05:47
so i would i tried my best but but now i
0:05:50
was just falling asleep
0:05:54
it was that boring
0:05:56
it's like uh it's like uh a frame is
0:05:59
that what you're yeah yeah
0:06:04
yeah and then i just turned back to my
0:06:07
so i'm doing kind of
0:06:12
uh the purpose of work as well so i've
0:06:15
had that pending so
0:06:17
i just jumped on on that one
0:06:23
that's what i would do
0:06:26
i'm not gonna i'm not gonna like spend a
0:06:30
that stuff i'm not good at it
0:06:32
i don't have the patience
0:06:40
not even even about patience
0:06:43
for me but it's just that i don't have
0:06:45
any interest in graphical designing or
0:06:49
if you don't that's the thing if you
0:06:50
don't have interest you won't have the
0:06:54
that would make sense yeah yeah
0:06:57
wow i just like i was like looking up
0:07:00
how you write hello world and c-sharp
0:07:03
are you kidding me
0:07:07
oh okay oh it's just console right line
0:07:14
no i saw this big block potato i just
0:07:16
saw this big block of text i was like
0:07:21
no is this is this java again
0:07:25
no okay i just didn't read carefully
0:07:31
you can see my screen right
0:07:35
yeah okay okay cool cool
0:07:41
what are we doing again
0:07:44
okay so we need to send a message from
0:07:48
the client so for example if we
0:07:59
first of all i think baby steps would be
0:08:02
to just send a message from the client
0:08:06
whether that is maybe
0:08:13
to the web server so okay
0:08:20
um deploy the the default route so we
0:08:23
can get back a message
0:08:30
or whatever you called it you changed
0:08:32
the name of the route i don't know
0:08:34
actually no i didn't because yeah i
0:08:37
remember last time yeah yeah
0:08:41
so okay cool in that case i'll share my
0:08:45
sounds good and i'll quickly do that so
0:08:48
that we can move on to the front end
0:08:51
because i really don't want to
0:08:53
give it too much time and then for the
0:08:58
this was just a practice that i was
0:09:07
look at that oh my head
0:09:16
so now i would this is in my
0:09:22
gonna do is glue all the folders that i
0:09:31
that one's done yeah gone gone from
0:09:34
perfect this should be all
0:09:37
and we need to go to sam api
0:09:44
and websocket integration
0:09:54
would want to deploy
0:09:57
actually make use of our
0:10:00
default function so i think i'll just
0:10:13
short as possible because we've already
0:10:21
man looking i learned looking through
0:10:23
these templates is tough
0:10:26
if there's like a small error
0:10:30
exactly it's functioning
0:10:35
that's what that's what it that's what
0:10:37
it felt like to me
0:10:39
right right yeah yeah
0:10:41
i know you've hit him
0:10:44
you need like a sound effect on the show
0:10:50
yeah and that's actually a good
0:10:53
uh pic you got on there and that's
0:10:56
basically part of their
0:10:58
stream labs well i just need to somehow
0:11:02
find some motivation
0:11:04
to actually get the overlay done
0:11:06
oh gosh i gotcha yeah
0:11:12
i can't i'm not i'm not like useful but
0:11:14
i watched i watched uh
0:11:18
stream on streaming from another dev i
0:11:21
like that i always say oh you guys
0:11:23
should watch learn with jason
0:11:25
well you don't but you never listen
0:11:27
nobody ever listens to my suggestion
0:11:31
but he's he makes like he has like good
0:11:34
overlays and like makes really funny
0:11:44
i see yeah that makes sense though
0:11:48
i think what i want to do is change that
0:11:50
to follow the convention
0:11:53
so default route default yeah that's
0:11:58
default group mission
0:12:05
actually is this default lab
0:12:08
mission or what see i'm becoming
0:12:10
confused now no no no no no no
0:12:14
default lambda yeah
0:12:16
okay so i've got function
0:12:19
i've got the permission
0:12:26
connect route and connect into
0:12:30
so if i do them over here
0:12:34
and just change these to default
0:12:42
this would go to default
0:12:47
um connect root operation name
0:12:52
can disconnect you know default
0:13:01
uh default yeah there we go
0:13:05
and then connect default
0:13:24
function comes here now
0:13:29
that makes sense default function
0:13:31
default function yeah and default
0:13:39
i think that should
0:13:44
hello let's hope so yeah let's hope so
0:13:51
and i need to add yep that's already
0:13:56
insert that one in and see what this
0:14:14
i hear them they're coming man don't
0:14:19
don't tell them my actions better finish
0:14:24
actually as soon as i do that then i'm
0:14:27
gonna come here isn't it
0:14:37
i can't hear them anymore
0:14:40
then then that means that's a good
0:14:43
signal man i like that signal it means
0:14:49
the deployment has worked
0:14:59
this one needs to do something really
0:15:05
we can take it from there
0:15:08
just bear with me for a bit
0:15:30
you australians like like honking in
0:15:35
yeah like yeah why are you even asking
0:15:44
they don't really they don't really honk
0:15:49
yeah i guess australians are really as
0:15:53
strict on the rules and if unless you
0:15:57
have an l play or a p play
0:16:00
if you do any mistake you will get
0:16:03
hunter you will as in there is no
0:16:05
running away from honking
0:16:09
if they see you're an el player or a
0:16:12
people then they become a
0:16:14
little bit patient
0:16:20
is that how it happens in you
0:16:25
i've never been there
0:16:29
it kind of depends on the area
0:16:32
like inner like if it's in the city then
0:16:36
you're just you're just honking because
0:16:42
really you're just you're just hung
0:16:44
because you're driving basically in some
0:16:50
it's not so common but you can get hon
0:16:53
here is like almost never honking i
0:16:58
yeah it's very like
0:17:01
it's very it's very different in my
0:17:07
all right the thing has failed and we
0:17:18
um i think i know where i failed
0:17:22
delete function delete lambda
0:17:26
where did it say i failed
0:17:34
so config defaults lambda permission
0:17:40
where does it say config default lambda
0:17:44
renaming it right okay that can't happen
0:17:53
so if i go to config lambda commission
0:17:59
lambda permission lambda permission
0:18:06
before lambda permission
0:18:14
actually let's delete that
0:18:25
let's delete the stack and recreate it
0:18:39
i forgot to do this
0:18:47
give or give a roar
0:18:58
okay yeah because we got top-notch
0:19:00
security over here exactly saw tick
0:19:03
comes first even before coding
0:19:09
it doesn't matter if
0:19:11
if you don't have the code or not the
0:19:14
repos has to be secured
0:19:16
even if it's blank
0:19:19
your your credit your credit card must
0:19:21
be secured saying it's
0:19:27
that's like the the thing that always
0:19:29
wigs me out about aws or any of the
0:19:33
it's just like how powerful it is if
0:19:35
someone has a root access oh
0:19:39
you know then you you can basically
0:19:42
your account to be honest and your
0:19:45
credit card balance
0:19:48
it's it's kind of scary the stories i've
0:19:56
somebody accidentally posting an api key
0:19:59
and committing it to get and then
0:20:02
putting it up and then like some some
0:20:08
and then they wake up
0:20:10
then there's like a ten thousand dollar
0:20:11
bill on their account and like
0:20:14
all these ec2 instances mining crypto
0:20:24
and he'll be like i hear he'll be
0:20:28
getting emails from uh aws oh
0:20:33
you've gone above the threshold and
0:20:36
everything oh it must be just ten
0:20:39
dollars or or five bucks but when the
0:20:43
what 20 grand for what
0:20:45
yeah oh man that's basically that i'm
0:20:52
i don't exist anymore yeah
0:21:33
hopefully this time it deploys perfectly
0:21:37
let's hope so finger is classed
0:21:41
i'm just checking how we got the e yeah
0:21:44
this didn't change did it which is fine
0:22:06
by the way have you
0:22:09
linkedin exams or the skills yeah
0:22:13
i've done a bunch of them oh nice one
0:22:17
i'm lame like that
0:22:20
whatever i can do to help my length and
0:22:30
yeah i think it's a really good practice
0:22:32
and to have a bit of a revision of your
0:22:35
technical skills especially
0:22:38
yeah i mean some of the
0:22:41
some of the questions
0:22:43
depend well i can't speak to all of the
0:22:45
ones i've taken because it was a while
0:22:47
ago i can't really remember
0:22:49
but some of them are like
0:22:53
some of them are a little dated
0:23:01
a little bit all over the place
0:23:07
yeah i think there were like two i
0:23:09
failed and i had to like wait
0:23:11
like three months or something
0:23:15
oh right right so if you fail
0:23:18
you need to wait three months to retake
0:23:23
something like that yeah i mean i i
0:23:25
don't know i don't know how much these
0:23:27
assessments like honestly help your
0:23:30
algorithm on linkedin or not
0:23:34
yeah i don't basically know because what
0:23:37
i'm doing is part of my work training as
0:23:41
i do the training for example i do the
0:23:44
get training first and then
0:23:46
take the exam at the
0:23:48
uh end of the course
0:23:55
so okay cool so this is done um we need
0:23:58
to get the endpoint
0:24:02
which is right in front of me why am i
0:24:08
the next one yay we have all our roots
0:24:14
all right let's see if that
0:24:30
and then if we send the message
0:24:36
before they should give me back that
0:24:38
message from the lambda
0:24:45
so the message is coming well we have an
0:24:48
internal server error as well
0:24:56
to be honest i'm not entirely sure
0:24:58
we need to check let's go and have a
0:25:03
i think that was there before i think it
0:25:05
had to do with like the return
0:25:08
like the return while you're returning
0:25:10
back from the lambda
0:25:13
we were trying to solve the problem
0:25:15
where it was sending back two messages
0:25:18
and then we just said okay we'll just
0:25:24
this has come back and come back to us
0:25:31
where's the default one
0:25:33
i was hoping it would just fix itself to
0:25:40
fixed just had enough rest
0:25:45
um okay this is the function
0:25:51
what was that triggered as
0:25:56
okay this is the trigger
0:26:02
yeah this is triggered fine i don't see
0:26:04
any problem here i think it has to do i
0:26:07
think it's the return in the lambda if
0:26:09
you check out the code for that lambda
0:26:17
i think it's giving you an internal
0:26:18
service there because it's not returning
0:26:23
i could do basically this isn't it
0:26:37
i mean back to the
0:26:42
like you can you can make a new line
0:26:46
you can always oh i can't say that's
0:26:48
good just return back at 200 status code
0:26:56
probably enough to make it happy
0:27:03
maybe it needs to be an object
0:27:11
appease the lambda thinking
0:27:21
oh no no i have to deploy it again
0:27:31
let's do that without wasting any time
0:27:39
actually have i saved it i don't
0:27:44
there we go now saved
0:27:53
do you know anyone who's good at
0:27:58
i have a guy but he hates it he used to
0:28:08
i don't really mind he might he might he
0:28:10
might do it then yeah oh
0:28:13
my god he studied graphic he studied
0:28:15
yeah money always talks dude yeah he
0:28:17
studied graphic design i just don't he's
0:28:20
like i can ask him he works a lot
0:28:23
if he can yeah that'd be nice i don't
0:28:26
know if he has the time but i can ask
0:28:31
if you can because um to be
0:28:35
honest i'm really tight on time myself
0:28:40
which is why i'm willing
0:28:48
i feel like i should know somebody else
0:28:51
who does it too but
0:28:57
yeah that'll be actually really helpful
0:29:04
sure yeah i'll ask him
0:29:06
i mean i don't know if the is there like
0:29:15
as soon as possible because of i've
0:29:17
actually taken a monthly
0:29:23
for now as in just to try the news
0:29:26
software for the first
0:29:28
for the first month and see how we go
0:29:31
and if it all works out then
0:29:36
we'll subscribe to foreign and the
0:29:39
budget is a blank check
0:29:43
i i'm not that rich man no i'm not
0:29:47
i'm never whatever you want
0:29:49
yeah however much money he said it's
0:29:55
yeah just basically
0:29:58
ask him how much um
0:30:02
would he be really and then i'll have to
0:30:04
check if it's even my
0:30:07
yeah yeah i have no idea i would imagine
0:30:12
sometimes i'd say depending on well it
0:30:14
depends on what you're doing but i
0:30:17
necessarily cheap i guess
0:30:21
i mean um i don't know so it wouldn't
0:30:24
really be that hard at all because i i
0:30:26
know that the themes are already there
0:30:28
all it needs to be is just
0:30:31
drag and drop but because i don't
0:30:35
know this software at all
0:30:38
so everything i want to do i need to
0:30:42
come back research first
0:30:44
come back and that's really time
0:30:52
okay cool so let's check this out now
0:31:02
nice nice you rock tory
0:31:07
thanks man you rock too
0:31:10
thanks man you're right all right cool
0:31:13
now that we have got this um i think in
0:31:20
we basically need to pass him the object
0:31:23
from the front end
0:31:25
isn't it correct yeah i think so
0:31:34
we just have to basically
0:31:42
and then this this string will get
0:31:47
um a kind of variable here
0:31:51
okay i'm sharing my screen
0:31:58
your screen is on now
0:32:07
what is it called websocket webs yeah
0:32:10
right right there too
0:32:16
oh because one is the
0:32:21
and the other one is the oh oh url
0:32:28
um okay so all you need to do then
0:32:35
socket send and then
0:32:38
we uh just for starters right we have uh
0:32:46
and then it's just default
0:32:57
wouldn't the action be as a string as
0:33:02
it won't matter it'll be it'll be
0:33:16
um so we want to take the send
0:33:23
so we got this on connect function
0:33:26
all right so this should be on open
0:33:30
and then basically when this event is
0:33:36
then we want to send a message
0:33:42
um i think there's like a thing too
0:33:56
yeah so basically you can do a check if
0:34:03
and then if it is like you can do that
0:34:08
uh send message function
0:34:13
you don't have to do it like this way
0:34:15
honestly if it's me you know you know
0:34:30
you probably hate me
0:34:33
it's all reject and then
0:34:41
and then i'm gonna resolve
0:35:02
do you ever use these
0:35:09
uh after basically after this is done
0:35:13
you'll probably have to
0:35:16
a little bit of it because this is how
0:35:18
you make a promise in javascript so if
0:35:21
you ever want to make code asynchronous
0:35:24
yeah then this this is how you do it so
0:35:26
you have this like resolve and then for
0:35:28
reject you would do like
0:35:30
some situation like the error so if you
0:35:33
had the exception you could reject on
0:35:35
there and then this
0:35:37
so now i can make um if i wanted to i
0:35:41
can make this function here asynchronous
0:35:45
and then i kind of wait for this of
0:35:49
yeah of course because you're promising
0:35:51
it yeah yeah that's that's the whole
0:35:53
purpose of this so basically instead of
0:35:55
guessing when the connection is open now
0:35:59
the websocket handshake is done
0:36:01
i'll know as soon as this promise is
0:36:03
returned because i'm resolving it on the
0:36:07
i mean honestly you don't even need to
0:36:09
resolve the event it's pretty useless
0:36:10
you just resolve here
0:36:12
return this thing this resolve
0:36:16
this allows parameter allows you to
0:36:19
return back some data
0:36:24
from the problem right right i see i say
0:36:26
yeah that would make sense
0:36:56
once we know it's once we know it's open
0:36:58
we can yeah drink that water
0:37:01
and we can send a message and hopefully
0:37:05
that will send the message and now
0:37:09
do we have something that's a listening
0:37:11
for a response or no
0:37:15
i don't think so right
0:37:20
okay perfect so we can
0:37:24
um i can just do this right here for now
0:37:26
and then we can just move it
0:37:29
for sure we can do
0:37:36
just bear for me for two minutes i need
0:37:38
to get my charger all right no worries
0:38:39
okay i think we got everything i need we
0:38:41
need all i did was have this on message
0:38:45
event listener from the websocket api
0:38:48
and that basically just listens for
0:38:50
events and that's pretty much all you
0:38:54
so basically all right
0:38:56
it's quite simple honestly
0:38:59
interesting then then in here like from
0:39:02
this from this um from this event
0:39:07
event object you will get like i don't
0:39:11
the shape of it when it's gonna come
0:39:12
back right now from the lambda but
0:39:14
usually like it's like it
0:39:16
usually it's like event.data and then
0:39:21
parse it um jason parsett and then
0:39:23
you'll you'll get a json json version of
0:39:27
of the of the message with the string
0:39:29
like hello from default lambda or
0:39:35
that makes sense though
0:39:43
um you probably have to change the
0:39:46
website km url so i'll
0:39:53
and how do i how do i start up the
0:39:57
uh have you got live server
0:40:14
of course it's disabled
0:40:27
i need to reload oh i don't need to
0:40:29
reload that's nice
0:40:32
all right so this is the new
0:40:52
you know what you might want to do have
0:41:00
environment.js file
0:41:13
you wanna maybe create one
0:41:17
sure and you just send me the
0:41:21
yes i'll send you the information and
0:41:24
then what you can basically do is just
0:41:38
environment variable
0:41:55
i'll just copy and paste and in that way
0:41:58
you can just copy and paste over your
0:42:09
what do you have in here some type of
0:42:15
is it some type of object or something
0:42:33
so it looks like this and then you have
0:42:35
something like url yeah yeah okay
0:42:45
put this url in the
0:42:49
you know better i know
0:42:52
yeah again why am i talking to you
0:42:54
you're doing good you're doing
0:42:56
good man you're good you're good
0:42:59
i don't know javascript that's i'm still
0:43:05
we're always learning right there's
0:43:08
always a lot to learn
0:43:10
i'm sure there's like a lot of like my i
0:43:12
focus on the front end so
0:43:17
lick of c sharp so this isn't a
0:43:19
competition anyways yeah yeah
0:43:25
like in back end stuff
0:43:27
no i'm not good at it because i don't do
0:43:57
my dog loves it when there's a cat
0:44:04
live server i will open it yes
0:44:09
do you want to share your screen
0:44:11
oh right right right my bad
0:44:14
let me close this too
0:44:22
which html file do i open index.html
0:44:30
because if you know it's doing that in
0:44:32
that way it's not gonna work
0:44:45
you can probably just run it from the
0:44:47
terminal as a live server and then okay
0:45:02
right and then yeah
0:45:11
i think i would know what the problem is
0:45:13
you probably haven't got the url
0:45:18
yeah so i'll give you the url of the api
0:45:23
and then you can deploy that
0:45:25
as in um have that in your
0:45:33
no i did something wrong where does this
0:45:41
what is needed you know the
0:45:46
url um that is for the api gateway
0:45:52
um so we would need to make another
0:45:55
consonant variable in the environment.js
0:46:01
okay so go in here and make another
0:46:07
i think the problem is that
0:46:10
the naming of the environment the
0:46:16
to what is referenced so you know where
0:46:21
where you named the
0:46:30
rename it as environment all lowercase
0:46:35
dot js really okay
0:46:39
oh my bad dude i hope no no i sh i
0:46:44
should have told you um oh
0:46:46
you were doing it in front of me man so
0:46:49
i should have told you before
0:46:52
that's just the end point right
0:46:59
um so it's it's so it's an in a j but
0:47:08
dot dot env dot js
0:47:13
huh that's interesting how does that
0:47:18
i've never i've never used this type of
0:47:22
oh go back hang on
0:47:26
what are you talking about i i i
0:47:29
completely missed you
0:47:37
environment as in in full e and v
0:47:42
i r o n m e and t or
0:47:47
so that would be the file
0:47:51
can you spell it in the chat from me
0:48:04
huh is that like a special type of file
0:48:10
to be honest i i just learned this tech
0:48:13
technique from online where a person had
0:48:16
all the environment variables in of
0:48:20
in a file and then he just put that file
0:48:26
interesting okay yeah i'm used to using
0:48:29
environment variables type files like
0:48:34
but i've never seen this is that the
0:48:37
yeah that's better practice
0:48:40
so in fact in that case we can just um
0:48:46
page should have done it and um
0:48:51
file in the code by just yeah by just
0:48:55
changing it yeah because i didn't know
0:48:58
what the best practice
0:49:01
so usually you have a file called like
0:49:03
dot env or dot env dot local
0:49:07
right right so i see and so you just
0:49:11
and then you get ignore that so i can
0:49:13
just call it dot env dot dev or whatever
0:49:18
and then inside here you just have key
0:49:21
so we can do url and then
0:49:25
equal and then i mean this is this is
0:49:28
how you make a comment
0:49:34
or yeah hash and then this is like uh
0:49:40
and okay yeah that's a good one
0:49:47
i can't remember if if the spaces matter
0:49:49
so i'll just put the underscores but
0:49:51
then basically here you just give it a
0:49:55
you know a variable name a key name and
0:49:59
i just put the variable and you don't
0:50:00
need to put like quotes or strings or
0:50:02
anything it's automatically gonna be a
0:50:06
this is a lot easier and a lot
0:50:08
meaningful as well
0:50:12
uh yeah um it's i mean at least on the
0:50:15
front end i i i this is the way i
0:50:17
usually see or at least i learn the way
0:50:24
so i'm this is actually the only way i
0:50:26
really learn so i don't know if this is
0:50:29
still the best practice but
0:50:31
that's the way i've always seen it
0:50:36
um so because you have changed the file
0:50:40
name you probably want to go into
0:50:48
index.html to change the file
0:51:04
what are these importing
0:51:07
so oh okay i see i see how you got this
0:51:10
to work i understand now so you were
0:51:12
importing the script and then gotcha so
0:51:14
in this case we probably won't even need
0:51:18
oh okay interesting
0:51:25
well actually this may not work because
0:51:27
usually i use something like a bundler
0:51:33
yeah maybe it's not gonna get injected
0:51:37
right because usually i wonder if live
0:51:42
so you would do something like
0:51:43
process.env then the name of your file
0:51:47
but i think this isn't going to work
0:51:56
like type of bundler or some type of
0:52:00
like web pack or blah blah blah to
0:52:03
basically inject these environment
0:52:05
variables for you at build time
0:52:11
um kind of like in the lambda like you
0:52:13
can set environment variables too right
0:52:20
process is not defined
0:52:24
yet huh what happened
0:52:31
you want to do it in home.html as well
0:52:34
because they're that's
0:52:36
referenced in two places
0:52:51
let's see if it showed up
0:52:57
okay yeah process is not defined because
0:52:59
that's a that's a node thing
0:53:03
i think the other way you had it is good
0:53:04
enough for now and then in the future it
0:53:10
the other way to do it is there's
0:53:12
a very popular package called
0:53:19
this basically loads environment
0:53:25
but like usually i just i'm using
0:53:28
something like react wow 24 million
0:53:34
yeah so that i'd say that's probably the
0:53:38
for working with environment
0:53:44
i'll just revert this
0:53:46
back to the way it was for now
0:53:54
okay that's that's good and then
0:54:00
just gonna delete it for now
0:54:02
okay and then we have this environment
0:54:14
what happened tori
0:54:17
nothing at all yeah
0:54:22
okay i think i just need to go in here
0:54:29
environment.js file real fast
0:54:34
what did you send me in the chat
0:54:39
that's the same thing i have
0:54:43
the url must have changed
0:54:45
because we just redeployed it
0:54:48
hang on a minute i'll check what the
0:54:52
just give me a minute
0:54:58
yeah so this is the url
0:55:08
send it to you through the chat
0:55:35
can i just use the delete key
0:55:55
wow it's oh wow it's bug season dude
0:56:10
every year around this time of year like
0:56:15
what are they called they're like
0:56:18
termites they come out of the ground and
0:56:20
they do this thing to breed
0:56:25
yeah and then it's really annoying
0:56:26
because it lasts for like two weeks and
0:56:28
they just make a mess
0:56:30
yeah but they're they're really they're
0:56:32
really dumb they just like
0:56:34
they just fly towards the light and then
0:56:37
lose their wings and then basically die
0:56:39
and then like everything else eats them
0:56:41
in like two seconds
0:56:49
why is this still a problem
0:56:52
do you want a hard refresh
0:56:57
you think it's the cash
0:57:07
still problem with that env oh um can he
0:57:19
what hang on it says the environment.js
0:57:26
in home.html did you change the file
0:57:30
back to where it was
0:57:33
yeah it's called environment.js
0:57:38
do you want to check
0:57:41
it's it's right because get get ignore
0:57:48
so that's no fun on core reference term
0:57:50
and b is not defined can you go back to
0:57:53
the oh wait wait wait wait wait wait
0:57:55
wait i think i do know the problem
0:57:58
that that file is inside of client
0:58:04
you guys are really annoying
0:58:13
unexpected token expert
0:58:20
open with live server come on
0:58:25
do you want to go to your environment.js
0:58:34
i'm not getting that error that didn't
0:58:36
find it it says uh oh okay
0:58:39
all right let me fix this on the side
0:58:42
all right i think i know the problem
0:58:55
okay that's some on load thing
0:58:59
all right i don't know what that is did
0:59:02
did you do it you pull
0:59:06
right at the start
0:59:12
um all right let's see
0:59:31
okay sister no no no no no don't don't
0:59:35
all right all right all right
0:59:37
all right that's enough we'll come back
0:59:43
yeah it must oh oh my bad it must be the
0:59:48
i mean it must just be like the way my
0:59:50
environment is set up or you're like
0:59:53
are you blocking my ip or something
0:59:56
actually let me check on my and if i've
0:59:59
got the same problem
1:00:04
like did you set up course to only work
1:00:06
from your ip address or something
1:00:12
my right can you um can you actually um
1:00:19
url that i gave you
1:00:34
we need to get you uh
1:00:37
some kind of a cool cool background
1:00:39
cause these flies are really
1:00:42
creating not a good look at all
1:00:46
yeah i was worried that they would come
1:00:48
out then next time i'm just gonna move
1:00:53
cool man yeah that'd be great
1:01:02
so look at my screen i'm going off i'm
1:01:04
going off my i'm going off
1:01:08
it's embarrassing dude
1:01:15
is this working now
1:01:24
why is it not working
1:01:28
actually i'll check my one still still
1:01:31
blocked don't worry don't worry it might
1:01:39
minor thing that's causing it
1:01:41
let me have a look
1:01:46
oh wait a second there's a typo on my
1:01:53
i had to type though
1:01:57
let's see if this fixes it
1:02:03
didn't look like you did
1:02:13
oh it worked it worked finally there we
1:02:20
okay but the web the web socket
1:02:25
okay we can basically come back to that
1:02:30
have you got the right one i'm just
1:02:34
changing yeah you wanna you wanna make
1:02:35
sure it's the right endpoint
1:02:38
it's in the private chair right at the
1:02:40
top the latest one
1:02:52
yeah i think it's the same thing
1:02:54
it's weird it's not
1:02:58
are you oh it's different yeah
1:03:02
huh i thought i updated it
1:03:13
oh you're right it is different okay
1:03:16
let's give that a go
1:03:21
now you would have just start the
1:03:23
process again yeah
1:03:26
you shouldn't be able to
1:03:28
yeah that's yeah boy
1:03:34
okay and now let's check the console
1:03:40
no errors from the websocket
1:03:44
the function didn't get fired
1:03:47
uh i'll check on the
1:03:52
the function itself
1:04:02
everything this onload function is
1:04:05
getting called right
1:04:10
yeah so default we need the default
1:04:17
oh yeah it was because i remember see i
1:04:21
so wait on connect
1:04:26
yeah it did get caught
1:04:32
i think it did get caught
1:04:41
so nobody connected
1:04:45
actually i'm going to check that as well
1:04:47
as could you point it out to check even
1:04:49
if someone connected i think somebody
1:04:52
did because otherwise it should error
1:04:58
there's this on connect function
1:05:04
can you try and connect again
1:05:12
double checking my code here
1:05:17
your promise was all this looks good to
1:05:19
me the websocket try this
1:05:26
logging the event see that's weird i
1:05:31
of the on open event get logged
1:05:38
i don't know why all right um i'll go
1:05:43
can i reload the page oh no i can't
1:05:46
okay so i gotta go back
1:05:51
tori do i have to keep creating new
1:05:55
oh i can't hit the enter key
1:06:00
yeah that's the kind of a bug that we
1:06:04
that's that's pretty easy
1:06:07
yeah for me for me sorry
1:06:12
when you have time
1:06:30
still no still nothing logged in the car
1:06:33
hang on i'll check in dynamo if
1:06:36
something has come up
1:06:39
yeah so it is inserting the connection
1:06:46
maybe i wrote some bad code then uh
1:06:50
let me just check the default function
1:06:54
as well it's getting called
1:06:59
this is getting called at the top
1:07:02
so this this is definitely running
1:07:09
and you're in you are connecting
1:07:16
no there is no log so it's not
1:07:20
it's not triggering it
1:07:23
all right not triggering the default
1:07:27
but it is connecting
1:07:39
how come we're not getting a
1:07:42
all right let me let me try this the
1:07:45
without the maybe i'm messed up
1:07:53
accidental bug in here
1:08:02
oh okay i found the problem
1:08:06
this is getting stored here
1:08:11
whereas what's what's this
1:08:17
okay okay okay okay
1:08:23
this okay so this will go
1:08:30
and then this should be
1:08:32
web socket lower case
1:08:40
yeah before it was like
1:08:42
getting the websocket constructor from
1:08:45
the java blah blah
1:08:54
just go to dynamodb
1:08:56
promise cannot read type of no
1:09:01
hold on there's a type error okay that's
1:09:05
so there's a type error right here this
1:09:07
confirmation prompt so i'm just gonna
1:09:09
comment this out yes i can yeah that's
1:09:12
it's for whatever reason that's throwing
1:09:19
you're gonna have a lot of tory boards
1:09:24
what oh i hit enter
1:09:37
but bam websocket open open for business
1:09:44
so how are we getting any
1:09:48
response from the lambda
1:09:51
uh yeah there was still one more place i
1:10:09
bam message received this is a message
1:10:12
this is oh look at you so it is in the
1:10:20
right right right all you
1:10:34
and i'll leave it at that yeah
1:10:43
sorry i don't know i don't know what's
1:10:44
up with this though there's some there's
1:10:50
i was throwing some exception
1:10:55
figure it out though
1:10:57
um i'm pretty sure it would be a really
1:10:59
simple thing as always
1:11:04
perfect man that is phenomenal work from
1:11:08
thank you for that
1:11:13
do you want to push this code
1:11:15
i'll push it oh i forgot i need to i
1:11:18
need to write the other post too
1:11:22
oh i'm sorry i'm doing click op stuff
1:11:33
tell me knows the way
1:11:36
yeah changed what changed oh my bad
1:11:42
oh i think i'm i'm silly i think
1:11:44
prettier is running
1:11:49
oh no that's not good it's not good
1:12:02
figure out how to push these changes and
1:12:10
and i'll push it up
1:12:13
that sounds brilliant not a problem at
1:12:16
all and i'll just switch the screens to
1:12:23
cool guys uh thanks a lot for watching
1:12:27
this has been really productive session
1:12:30
and we did make a really good progress
1:12:34
the got to send them
1:12:37
send them a message from the client and
1:12:40
then receive the response from the
1:12:42
lambda which was in web socket server
1:12:46
client which is fantastic
1:12:49
if you want to check out how we do the
1:12:52
next step um come and join us tomorrow
1:13:13
join us tomorrow same time same place
1:13:20
that's the one baby all right we'll see
1:13:22
you tomorrow catch you guys later have a
1:13:25
good night have a good night thank you