And once the main structure of our front end is complete, we're pretty much done with the first part
of the course.
So now let's switch gears and start working on our back end.
As a side note from this point on.
I won't have the browser and a text editor side by side since there's very little point.
And I want to start with the folder structure and please don't skip over this video.
This is extremely important since if you don't have the same setup, it's going to be very hard to deploy
the project, which is obviously something we're going to do at the very end of this course.
So judging by the questions and issues that students experienced in the course Q and A in the previous
iteration of the course, I highly, highly, highly recommend having the same folder structure that
I'm about to set up.
This is extremely important, especially the git part.
So here's the first thing we want to do.
If you have an existing Git folder, essentially if you already set up the source control for the front
end application, please remove it.
So I'm going to use the Mac command since of course I'm using the Mac, but I also provided in the Readme
the commands for the windows.
Now I haven't tested these commands, but students provided them and I'm pretty sure they work since
other students agreed that yes, those are the correct commands.
So effectively the result you're looking for if you run git status is not a git repository.
So let's try this one out.
Now I already know that it's not a git repo, but you know what?
Why don't we do it one more time?
So get status fatal, not a git repo.
And this is exactly what we want.
Now if it says, yeah, it's a git repo again, run one of these commands, please make sure that there
is no existing.
Get folder inside of the client.
So that's the first step.
Once we have this one, we want to create a new folder.
So essentially we want to create the main folder.
So now let me navigate to a desktop and I believe I'm going to go here with Java file and once I have
this folder in place, so this is going to be our main folder.
We want to move the client to the Java file.
So yes, a little bit of acrobatics, but this is going to be our setup.
Now to answer your question, can you set up.
Both of them separately.
Basically, you have client and server.
Yes, you can.
But you need to add, in my opinion.
Quite a bit of logic in the main route.
One, in order to spin both of them up when you deploy.
And in my experience it's just easier if you do it this way.
So let me now move my job if I want.
Again, this is my main one, so the client is going to be inside of it?
Yes, that's correct.
So this is my client.
And first, I just want to move this Readme from the client to a source.
Yep, that's what we want to do.
So now it's located in the source.
And once the Readme is in the root, we want to create a package.json file which effectively is a manifest
for our project.
So this is where we'll have the scripts, this is where we'll have the packages.
And of course we already have the package.json for the client.
So now we'll be setting up the Package.json for our server.
So let's navigate I guess to the integrated terminal.
Let me double check over here.
And the command we're looking for is npm init.
And I'm just going to go with dash y, which is going to answer yes to pretty much all of the questions.
Again, please keep in mind that we're not talking about.
The client.
So this package, Json right now is in our root.
And in order to test it, I want to create a new file.
I'll call this Server.js.
So now, of course we don't need to use the JSX extension and essentially.
I'm not going to be original and I'm going to say server is working.
Dot, dot, dot, dot, dot.
And then let's navigate to integrated terminal.
And we're looking for Node.
And then let's run the file.
So in here you can add JS.
Remove.
It doesn't really matter if you see servers working.
In the console.
We are in good shape and we can move on to the next step.
Again, very, very important.
Make sure that the folder structure is exactly the same.
It's going to be easier for you also if you need to troubleshoot your project because if you don't have
the same folder structure in the course Q&A, I'll ask you to do it regardless.
And also it's going to be easier when we need to deploy the project.
So make sure that you have the main folder in there.
You have the client and client does not have existing git repo.
Hopefully that is clear.
Hopefully it wasn't too annoying that I was repeating that 50,000 times.
And yes, now we can move on to the next step.