In the last video he started up scaffolds for the first time.
Just so you know after building my images I started to be prompted with some eerie messages like the
ones you see right here.
Cynthia says manifest unknown not sure but tightly sure why this came up.
I solved it by just ending scaffold with control C and then starting up scaffold Dev.
Once again when I rebooted scaffold all these error messages went away so you might want to try doing
the same thing on your own as well after starting up scaffold the second time let me scroll down here
a little bit.
I started to see some output from each of the different pods that are created.
So here is some output from client from query comments moderation event bus posts and client again.
I think client was stirred up one time got killed and then restarted again.
The nice thing about scaffold first nice thing is that it's going to take all the logs coming out these
pods and print them up easily read inside of our terminal.
That's kind of a nice thing.
We should still be able to access our application by trying to go to post dot com so I should build
to refresh.
Yep looks good.
Do you remember that all of our data is stored in memory right now so every single time that we restart
these different services we essentially are dumping all of our data.
We'll fix that up on our next project for right now.
That's just the reality.
Now in theory we should be able to open up our code.
Ed go over to some sub project like let's say client.
I'll open up the s RC folder then the app dot J.S. file and maybe I'll make a change the each one right
here so I'll put in create post with a bunch of exclamations.
I'll then save that file and then go back over to my terminal and see what happens.
You'll notice that we got a little bit of output right here from scaffold it saying OK it detected that
one file is changed.
It took that file and threw it into our client pod the client pod then automatically sorted that file
changed and it rebuilt our ReACT application.
So I should yield to go back over to my browser now and see those exclamations like so now I do have
a very important note here.
Something super critical for you to understand are recreate racked up application is setup through all
to create react up magic and all that stuff.
Anytime it sees a file change like create react up in general anytime it sees a file change it's going
to rebuild the react application and refresh your browser for you.
That is something that is built into create react up.
In addition all these different nodes services we put together such as comments are all being executed
with node man and Node man as a tool to restart your project any time it sees a change to a file inside
of a given directory.
So right now all of our different pods the containers inside them are using tools that are going to
restart the given primary process whenever it sees a change to a file inside of that pod.
There's kind of like two levels of restarting or change detection here.
First off if we make a change to one of these files right here scaffold is going to see that kick in.
Take the updated file and throw it into a pod and then inside the pod.
Or more specifically inside the container.
We are running very specific processes like create react up or node bond that are seeing changes to
the files inside of that container and then restarting the primary process of that container.
Long story short if you start to write out some node applications or if you have some other kind of
front end application that does not use something like node wants something to automatically restart
your application.
If you just run this directly with node for example then even if scaffold throws an updated file into
your pod it's not going to do you any good inside the pod.
You still have to have something that's going to see the update file arrive in the pod and then restart
the primary process.
Now we usually do that with node with something like node Bonn or if you're using react.
Yeah you just use create react app or something similar although this refresh stuff is very handy you
set to make sure you take care of your part of the deal.
OK so let's try making maybe a change when these nodes services all open up posts indexed at J.S. then
maybe down here at the bottom.
Remember we've got that old console log of fifty five was changed it to version 1000.
How about I'll save that look back over to my terminal and there's the 1000 right there.
The thing I want to mention very briefly is that using change detection or file change detection inside
of Docker containers traditionally has been a little bit finicky.
There are some file watchers so stuff like node bond or create react up where they will not always detect
changes to files inside of a create react app or a docker container.
So there will be scenarios where you start to change files and you don't see any output whatsoever from
scaffold.
You might see that scaffold says oh I'm going to sync a file but then you might not have anything coming
out the pod set that says like oh I compiled successfully or I restarted the server or whatever else.
That is a problem that we're probably enough to deal with on this next application we build on and so
I'll give you a couple more notes on that on how to solve it.
I just want to throw it out there right now that if you ever feel like you're making changes but they're
not being reflected it's probably tied to the fact that we sometimes have challenges detecting file
changes inside of containers all right.
So those are just a couple of caveats I wanna throw out there really quickly but without a doubt we
can run our application we can make changes to it.
We don't have to rebuild the image update the deployment or any of that stuff manually.
So now any sign that we want to say go work on another project or something.
We are just going to stop scaffold we're gonna stop scaffold by hitting control see as soon as I do
so as I mentioned scaffold is going to take a look at all those different config files we point it to
it's gonna delete all the objects associated with them.
So now if I do a UFC DL get pods we're gonna have no pods found.
We could do a get deployments services and we only have the default Cuban 80s service right there.
So this is fantastic for stopping all that stuff running when you don't want to use it anymore.
And naturally if we ever want to start development again a simple scaffold dev and we are good to go.
All right well this is a fantastic little tool that we're definitely going to use on our next big application.
Well at this point I think we're all done with this first app.
I don't have a lot of other things to tell you about it.
We're gonna start to take a pause right here.
We're gonna come back the next video we're gonna start to reflect on some of the really big lessons
learned around this application.
We can start to take a look at the next app that we're gonna put together so quick balls and I'll see
you in just a minute.