This course has been updated! We now recommend you take the Angular 13 Fundamentals course.

Check out a free preview of the full Angular 9 Fundamentals course:
The "Setting Up the Repo" Lesson is part of the full, Angular 9 Fundamentals course featured in this preview video. Here's what you'd learn in this lesson:

Lukas demonstrates how to set up the course repo, runs the npm run server:all command to set up a JSON API server that the client-side app can communicate with, and uses ng serve to start the application.

Get Unlimited Access Now

Transcript from the "Setting Up the Repo" Lesson

[00:00:00]
>> We're just gonna clone the repo. I will do this with everybody. So Get clone. We'll just pull this down and we'll just step into this. So NPM install. And while this is doing this. The one thing that I will point out is we're on the master branch, which has pretty much a pretty good place of where I wanna go.

[00:00:37] By the end of the day if we are Within the neighborhood of the master branch, I will be pretty happy. To save everybody plenty of time, because this is an Angular workshop, not a typing workshop, I went ahead and created a 00 start branch. And I will show you what that looks like in just a moment.

[00:01:01] But what I've done is just some of the HTML templating and the styles and different things I've went ahead and and I've laid a foundation for us to just kind of jump in and start building. So I don't wanna spend two hours just building up templates in HTML.

[00:01:18] So there are two branches here and then as we progress through the workshop, we'll actually cut the branch and save a backup, so hopefully by the end of the day, we have eight branches, whatever. All right, so that is pushed up and one of the things that I do want to point out is, well, let's run this real quick.

[00:01:41] And then then we'll get into the angular CLI and what that does. So there's a small caveat here. So let me go, code, let me hop into VS code. And because we're going to be hooking into a RESTful API later on today, we are using a JSON server, which is a really, really nice way to create a mock REST API.

[00:02:13] So we have two commands here. If you just run NPM start, it's just going to spin up the Angular server. If you run NPM run server, you're gonna spin up the JSON server. What I've done is using concurrently is I've just created another convenience method to run them both at the same time.

[00:02:36] Concurrently, surprisingly so. Let me just show you what that looks like. NPM run server all And so you can see here this spun up the JSON server, which is just basically going to the JSON file. And it's saying based on the JSON, you have a courses endpoint. And then it's going to compile he Angular application into ES modules.

[00:03:05] So this does take just a little bit of time the first time around. And but once this is done, I can show you the app, we can kind of just click through it, and then we'll move on to the Angular CLI. And one of the things that is happening here that possibly in maybe a production app or something is just for convenience, I've imported all of the kind of Angular material components.

[00:03:32] But that's just for convenience probably in, like in a production scenario, I would definitely parse that down.