0:00:34
um mine's in the wash today
0:00:37
that's all good but anyway
0:00:40
um welcome back everyone welcome back to
0:00:42
another day of recording
0:00:46
um so if you're new here we are your
0:00:49
coders that means we are a team of two
0:00:51
developers from Melbourne Victoria
0:00:54
um working on a project which adds
0:00:56
persistent storage to stumbler.ca
0:01:01
um if you've been following us recently
0:01:02
we've been working on resolving the
0:01:08
we've been working a lot on that lately
0:01:11
um and even if we are not failing a bit
0:01:15
uh we are discovering a lot of different
0:01:17
Pathways which works between resource
0:01:20
sharing on the web
0:01:22
um so yes let's start fresh today
0:01:25
and if you guys enjoy this new haircut
0:01:29
I just gonna comment on that one that
0:01:34
sure looking good brilliant man uh
0:01:38
um so just to correct you on something
0:01:41
you just said early on we never fail we
0:01:46
always learn yeah I don't know for sure
0:01:48
all right so yeah every time we learn we
0:01:53
have one step closer to success
0:01:58
um so right so just a bit of an update
0:02:01
there we do speak to one of our one of
0:02:05
our really good friends as a mutual
0:02:07
friends about the cause issue and
0:02:12
she's a really as in talented coder and
0:02:20
as in we really look up to him so he
0:02:24
pointed out that the issue is
0:02:27
to do with our Express app and not with
0:02:30
the API Gateway so
0:02:33
today what we're going to be doing is
0:02:36
looking at what's wrong with our Express
0:02:41
experiment experimenting some changes
0:02:44
until we get working
0:02:51
cool so I'll just share my screen now
0:02:55
and I've already got that page open so
0:02:59
that wouldn't be a problem it would save
0:03:01
us a long time nice
0:03:16
so we already tried to set these headers
0:03:25
set these on the response
0:03:30
and less and do we check if this but on
0:03:36
okay it wasn't worth I can't remember
0:03:45
um what we can do today is then
0:03:48
um like you know how when we stream
0:03:52
it kind of like does slow down a bit
0:03:56
so that being said what we can do is
0:03:59
you work on your uh like treasure is all
0:04:02
good I'll work on my end and like we'll
0:04:04
divide the work so that we both are
0:04:09
okay yeah like we can keep like we'll
0:04:14
then double our speed if you work on the
0:04:16
app as well and I work on the app as
0:04:20
like you can share your screen sometime
0:04:23
like for 15 minutes or 20 minutes and
0:04:24
I'll keep Googling stuff and explain it
0:04:27
because we can't just keep on Googling
0:04:30
stuff and like expanding one thing and
0:04:32
like take it 30 minutes for it so I
0:04:34
guess we need to increase our speed of
0:04:36
experimenting with it
0:04:38
yeah true I completely agree with the
0:04:42
view and for some reason you read my
0:04:45
mind because I was gonna explain that
0:04:48
approach just speed up the things as
0:04:51
well but it's really good that you have
0:04:54
the ability of being psychic as well
0:04:58
I thought you told me either
0:05:03
all right brilliant
0:05:06
um yeah I'll start my work silently as
0:05:08
well and um you can do your stuff okay
0:05:12
so what I would want to do maybe is that
0:05:16
one of us has to keep talking because
0:05:20
that would just bore the viewers so do
0:05:24
you want to actually
0:05:27
um I'm sure okay how about if we do it
0:05:31
in this weather every 15 minutes we
0:05:34
switch so you shake your screen and then
0:05:39
you start talking and then I go offline
0:05:42
and then do they keep on doing the work
0:05:46
until we get resolved how about that
0:05:48
right um yeah we can do that um I guess
0:05:51
it's just that I guess we can do more
0:05:55
like working today or rather than
0:05:57
explaining what we're doing if that
0:06:00
you know how like streaming as a
0:06:03
kind of taking it slow and uh yeah yeah
0:06:08
yeah I suppose I see what you mean even
0:06:11
if you're doing that just like speed it
0:06:13
up or like even even only if some of
0:06:15
your comments then only you can interact
0:06:18
with them okay cool yeah that sounds
0:06:21
good yeah until then we just keep
0:06:23
Googling and keep Googling
0:06:26
sounds good all right let's do it
0:06:43
I'm just meeting myself for five minutes
0:06:46
I'm still here all right cool
0:07:34
with single groups
0:10:07
just updating my CLI
0:10:12
okay because I've applied energy change
0:10:16
and after show done and if it doesn't
0:10:20
work then I'll try my change as well
0:10:29
yeah did you get something like
0:10:36
um I don't know if it's good or bad
0:10:40
until I try it all right you're
0:10:45
because I don't really wanna
0:10:48
deploy and override your change yeah
0:10:52
yeah no I'm gonna deploy to mine my
0:11:05
that's the whole point of like dividing
0:11:11
we're gonna be super efficient now
0:11:17
I've got water or not yes I do
0:11:21
because I need to get mine
0:11:59
credentials for what
0:12:02
when I do sound deploy
0:12:07
have you made that profile as in default
0:12:28
oh I needed to guide it oops that's my
0:12:34
right that makes sense
0:13:41
we're just gonna double up our speed
0:13:44
um events working on his laptop I'm
0:13:46
working on my laptop
0:13:47
and uh yeah we just try to
0:13:53
um Google stuff and try to implement
0:13:54
stuff really really quick
0:13:56
we can head on top of it so
0:14:07
means that we're two people are working
0:14:58
um yes I'm like we are working on the
0:15:02
same issue is it that
0:15:04
um we've been taking a lot of time to
0:15:06
resolve the code there
0:15:10
we just thought like you keep
0:15:12
experimenting different stuff
0:15:15
so that we can double our speed
0:16:54
yeah and a really interesting one
0:16:57
apparently apparently Access Control
0:17:06
causes that kind of a problem
0:17:12
so I'm just gonna actually yeah
0:17:17
we did but it's still in other methods
0:17:20
so I'm gonna remove that one from other
0:17:34
yeah that's one of those for this one
0:18:16
let's check this one out
0:19:22
by using one engine
0:19:25
which you can see this
0:19:33
percentage of these
0:19:36
can differentiated properties
0:19:56
work in progress nice
0:20:04
okay mine's deployed on my uh you know
0:20:08
cool I'll send you this link
0:20:12
um see if you can you use your pretty
0:20:17
quick scan skills to find out
0:20:24
I'll just give uh my thing here
0:20:57
all right so I need to do that in the
0:21:00
header not the response
0:21:06
maybe that might be it
0:21:36
guide me for one second
0:21:40
um what do I need to change in the
0:21:43
port to deploy again
0:21:49
um do you know when it uh
0:21:53
changing the code to deploy again what
0:21:56
you mean so it gives me a resource not
0:21:59
found so I do anything to lender
0:22:00
function or something
0:22:03
you probably have to change the DV table
0:22:09
how they do that and go to the stack
0:22:22
say that David then right at the bottom
0:22:29
yes and paste it in the um in the
0:22:34
in the middle way or back in was it in
0:22:38
the back end Express that
0:22:44
just let me know where I'm here
0:22:53
on line drop it down 27 yeah
0:24:59
and then in the schema
0:25:05
yeah wow that's fine
0:25:08
and then go to resources
0:25:27
and then go just give it a Lambda
0:25:33
it would be on your
0:25:35
classroom Cloud information
0:26:13
and I'll go to Method response
0:26:20
okay that's fine stay already
0:26:38
and now you can deploy it
0:26:45
writing the options
0:26:59
I know I'll just reply
0:27:03
fraud yeah probably production
0:27:49
this is more like a study session though
0:27:51
like I feel like I'm studying with my
0:29:22
all right now go to the link you sent me
0:29:26
18 smells 18 for the middleware or the
0:29:31
you said that in 1959 so probably
0:29:37
because she can only see my screen at
0:29:44
oh okay it's your screen ah
0:29:47
um he did highlight that
0:29:51
nine and we should be choosing
0:29:54
triple equals on that line not a single
0:29:59
equals so if you want to change
0:30:03
okay cool yeah that's fine
0:30:09
thanks for hundreds of picking my
0:30:14
mistake uh again um with just at the
0:30:18
moment focusing on getting rid of the
0:30:24
um we will be coming back to these
0:30:27
courts matting lines after that
0:31:21
on the first line of home only
0:31:25
it's all like it's going in the function
0:31:29
you know what I mean
0:31:36
the error is unlike the first line of
0:31:40
home.html that means that
0:31:43
as soon as this phone this whole whole
0:31:45
page comes in the API isn't responding
0:31:49
like it's not with just one particular
0:31:51
function it's the whole configuration
0:31:56
you mean the whole page
0:31:59
yeah so if you see like home at like
0:32:02
this place is trying the error
0:32:06
not a particular function
0:32:12
but that's in HTML
0:32:15
that doesn't have anything to do with
0:32:19
um is this that this HTML page is trying
0:32:22
to access it right
0:32:37
you see how when I run it I PreFlight
0:32:42
response errors comes to home.html not
0:32:52
so she was saying that the Eric is in
0:32:55
home.html then I'm saying the errors in
0:32:59
isn't like none of the resources are
0:33:02
able to access the API
0:33:07
so this page which you see is home.html
0:33:09
right yeah so as soon as something tries
0:33:13
to access it from here it throws an
0:33:15
error at the first point
0:33:18
so I think like uh like the person which
0:33:22
he uh we asked for help today
0:33:24
um they were kind of afraid that the
0:33:26
problem is in the configuration of
0:33:34
and that's what we're working on it's an
0:33:38
active figure out what the proper
0:33:40
configurations are yeah now I just
0:33:43
wanted to kind of death
0:33:45
this really confirms that
0:33:51
yeah yeah that that
0:33:59
hello that was that how are we doing
0:34:26
actually I just want to see
0:34:29
is it only post or every function is
0:34:31
causing a problem so I'll just do a get
0:35:10
this is so interesting
0:35:13
what give me five minutes
0:36:32
I'll tell you what happened this is so
0:36:35
interesting you know you should come out
0:36:40
only the post method isn't working
0:36:48
this is the get method it's working
0:36:55
and if you know it's working
0:36:58
if there was a course thingy then the
0:37:01
whole access should have been blocked
0:37:09
has to match the headers and everything
0:37:13
but I don't think that they get one
0:37:20
for that matter can we do like
0:37:30
let's try doing that
0:37:33
actually I'll do get bored by value
0:37:36
because it's actually going in the
0:37:41
I'm totally missing
0:37:44
something here do you want to tell me
0:37:46
what we are trying to do now
0:37:52
I'm just trying to see if this function
0:37:55
is also accessible because this one
0:37:58
actually goes in the database
0:38:04
I'm just trying to see what happens
0:38:15
right right right I'm just gonna see
0:38:19
I'm just setting up the code basically
0:42:59
paying attention there I just came here
0:43:02
have you read the console letter it
0:43:04
tells you what theater is
0:43:07
you need to return
0:43:14
where where do you mean return
0:43:22
the response from the um
0:43:29
um we should have a status code 200 from
0:43:33
our Lambda which is the express app
0:43:37
all right and we are doing that
0:43:40
but um I'll show you Andre what we did
0:43:47
if we go on the function
0:43:51
uh we are doing this
0:44:02
got it because I think you might be
0:44:06
yeah I didn't get pulled um oh right
0:44:09
right okay I actually wanted to start
0:44:12
from where we didn't do it what we did
0:44:14
today in the evening okay cool yeah
0:44:24
um you need to actually
0:44:27
uh you need the actual value setting the
0:44:40
isn't this what we are sending
0:45:25
is that how I need to write it under it
0:45:38
so if that's the case then we have to
0:45:46
the status code and the board ID
0:45:50
yeah let's not worry about the board ID
0:45:55
go back to it and just
0:46:10
oh I can do this I guess
0:46:13
you know should I do this Sandra
0:46:22
or I mean oh you want me to do it in
0:46:24
adjacent for a moment
0:48:50
on just one second then I'm gonna watch
0:48:53
it from all the video
0:49:14
so I got this link from stack Overflow
0:49:17
someone posted the exact same question
0:49:20
like what we are doing
0:49:22
um I think I already know they're
0:49:25
getting the same error
0:49:28
they're using AWS as well they enable
0:49:30
everything on API Gateway
0:49:35
this is their fetch function
0:49:40
the the looks I'm not sure what this is
0:49:52
okay I want to make this very very quick
0:49:54
video so let's say
0:49:57
you have everything set up in Amazon
0:50:06
everything is working well
0:50:08
and then boom course policy block right
0:50:13
so how do you fix this
0:50:16
so the first thing you do is you type in
0:50:21
like AWS course right of course
0:50:26
you see it says enabling course for rest
0:50:29
API I'm Gonna Leave the link in
0:50:31
description below okay
0:50:33
so the reason why this is happening is
0:50:35
because there is an error in your Lambda
0:50:37
function you need headers okay
0:50:41
so you click on headers
0:50:43
yeah I probably will get this somewhere
0:50:45
so oh you copy this file here
0:50:50
and you put it into your Lambda function
0:50:52
like this uh so this stays code has to
0:50:55
be in the response yeah I'll do that as
0:50:58
well I'm just yeah which Andre was
0:51:02
already highlighting yeah yeah
0:51:05
so you see now we can test
0:51:12
right this is as your Andre is saying
0:51:16
exactly so hang on a minute
0:51:19
I will do so this is the response
0:51:25
please all right so you know how till
0:51:28
now we were not constructing a proper
0:51:30
response now we need to do it
0:51:37
like in the sense that we'll have a high
0:51:40
response header status code and like a
0:51:42
body yeah yeah right right go ahead and
0:51:46
make that on the current app
0:51:50
um right let's see
0:52:00
uh if you go to the cons to collect
0:52:06
what's your cornstar left go up for a
0:52:22
all right and we can get headers now
0:53:38
you know right yeah hang on this is the
0:53:44
we answer in the board
0:54:07
so if you look here we were sending the
0:54:09
board ID before all right so it should
0:54:12
be the Bold idea right yeah
0:54:16
so I'm just gonna confirm One Last Time
0:54:18
still support distributed like this
0:54:25
before I test it out I just want to test
0:54:28
what I've currently deployed
0:54:59
Terrace it won't do it
0:55:44
you can have a look again
0:55:48
I think pretty much
0:55:52
response and I didn't send the response
0:55:55
yeah but can you change the bar to a let
0:56:04
I was thinking the wrong way
0:56:13
so why are you sending the okay yeah
0:56:17
yeah that's fine that's fine
0:57:24
make sure that's deployed here
0:58:36
viewing Cloud watch
0:58:38
no let's have that
0:58:50
the last one should be at 10 30.
0:58:55
pause and now during that time
0:59:10
what is this all supposed to mean
0:59:18
I'm gonna have to check it
0:59:24
there's a stream called there you go
0:59:35
yeah you don't seem to have any errors
0:59:38
are you sure it's the right one
0:59:46
says internal solver
0:59:48
to go back to the cloud watch
0:59:57
not that that's my
1:00:14
go to the next one
1:00:19
ah here we go so click on the ball one
1:00:23
and one of the error types so go down
1:00:32
click on the fourth last one
1:00:45
there you go from there you can see the
1:00:50
syntax error and it says in Balance
1:00:57
does it tell the line number
1:01:03
check either the 98
1:01:08
check if that's a valid number
1:01:35
um is there any other line
1:01:39
uh go back I would have to check that oh
1:01:49
uh one no that's all profit
1:02:03
um you're sending the risk
1:02:06
ponds but in that code he's returning
1:02:17
but like we have to send to send we are
1:02:19
I'm pretty sure I don't think it's using
1:02:24
that might be the cause as well that's
1:03:29
every time it doesn't work that's how
1:03:32
much we are close up to making it work
1:03:57
more response data
1:04:00
okay for that matter let's see if we are
1:04:03
getting a response on Postman
1:04:16
because there's still something wrong
1:04:19
if you're getting another interview
1:04:26
check the syntax I'm pretty sure that's
1:07:00
oh that's not here
1:07:03
all right lead line 93
1:07:49
What's Happening Here
1:07:55
I copy that I didn't change it
1:08:38
all right send back
1:08:41
hey then sorry about that man that's a
1:08:46
and now I accidentally closed the the
1:08:53
stream yard and I was yeah
1:08:56
it must be on news now and then
1:09:01
until until you text home WhatsApp and
1:09:05
I'm like all right it's me
1:09:07
it's me Andy even that happens in me
1:09:11
like I I thought like you're mute for
1:09:14
like five minutes yeah and then what do
1:09:22
what do I think about what
1:09:42
thank you still listen to Etc
1:09:46
can you go back to your code yeah oh and
1:09:50
you want to see where the syntax error
1:09:53
yeah because you want both unless
1:10:03
it's on line 98 now
1:10:28
so I've got one single quote and two
1:10:32
double quotes at the end all right
1:10:37
let's see but that just happened
1:11:01
yes sometimes I I don't really cross the
1:11:05
line numbers as in I
1:11:09
consider them as a guideline
1:11:17
still trying to figure out
1:11:26
good to 93 once you try it
1:11:32
really I think I think I know where we
1:11:36
um why are you doing response equal to
1:11:45
shouldn't there should be status code
1:12:00
oh don't worry man
1:12:02
it's all a learning process no one's
1:12:10
we all are learning
1:12:25
for the promising like this
1:12:27
hopefully hope for the best plan for the
1:12:51
declare something and now oh
1:12:55
I won't do it just yet
1:12:58
electron a talk I'll talk to you about
1:13:03
that first all right yeah offline
1:13:14
I'm missing uh still there
1:13:17
oh boy go back to your Cloud watch yeah
1:13:21
and let's see the error but probably
1:13:22
will come back tomorrow
1:13:25
oh my mice 45 past already
1:13:35
on promise rejection rest dot send is
1:13:46
error message is no function I think we
1:13:49
need to need to set result and
1:13:52
then on doing an equal to ah here we go
1:13:58
see how he's using the status code
1:14:02
um I tried that that doesn't work oh
1:14:04
okay that's not exactly what we need
1:14:10
it's not it's 100 said 93 smells
1:14:17
yeah yeah I I think
1:14:20
I'm not sure how do we
1:14:22
create the response object properly
1:14:32
declare and the variable but we can do
1:14:35
this tomorrow though it's it's you know
1:14:37
let's say 11 or already
1:14:42
but yeah um we'll do something
1:14:45
uh so I think with the what what the
1:14:48
problem is they share aren't greatest
1:14:54
overwriting the existing yeah
1:14:57
response object so what my idea was to
1:15:03
create a different variable and then do
1:15:06
that but each year we can come back to
1:15:08
this tomorrow pretty sure there's a set
1:15:12
function I'll just go through a
1:15:14
documentation of Express
1:15:15
and pretty sure there's there should be
1:15:18
some set functions body like that's the
1:15:23
um thing of an API so yeah yeah I'll
1:15:26
just go over the documentation that's
1:15:27
the most helpful thing yeah yeah I think
1:15:31
I'm gonna do this as well because
1:15:35
I'm pretty sure we are we are
1:15:37
this close yes for sure
1:15:50
cool I agree with you as well as in we
1:15:55
are doing pretty good and it's all what
1:15:57
not to do yeah in the future so that's
1:16:05
on this point us in yeah
1:16:09
our code smell that's always good
1:16:13
because we need this this kind of
1:16:16
critical attention to detail as well
1:16:20
um yeah so thanks a lot Andre thanks the
1:16:24
other viewers thank you any Aurora
1:16:32
um so we are nearly there we believe and
1:16:36
hopefully in few days we will manage to
1:16:42
um have you got anything to say okay
1:16:46
no I think it looks pretty good let's
1:16:48
come back tomorrow and let's just keep
1:16:51
working and let's keep the hard work on
1:16:53
coats sounds good all right guys thank
1:16:57
um where are you on the road have a good
1:16:59
night morning or evening but in terms of
1:17:02
Melbourne Australia
1:17:05
night and we'll see you tomorrow same
1:17:08
place same task and same
1:17:11
time I always mess this up all right
1:17:16
guys have a good night