课程: Vue.js: Creating and Hosting a Full-Stack Site
Codespaces
- [Instructor] For this course, we're going to be using Codespaces to build our full stack application, and I definitely recommend that you follow along in Codespaces as well. Now, in order to open up Codespaces for this project, there are two ways to get there. The first way is simply to navigate to the GitHub repo for this course and add /codespaces at the end of the URL. And that'll take you to this screen. And the other way to get to this screen is just by clicking on the link for GitHub Codespaces below. But anyway, once you're there, you're just going to click on this green button that says Create Codespace on Main, and that will open up an editor for you. And that takes a minute or two, so just wait for that to come up. And once the editor finishes loading, you should see all of the files for the project over here on the left hand side. Now if you want to navigate to the specific state that our app is in at any given point in the course, you can simply check out the corresponding branch with the chapter number and the video number. So for example, if we wanted to check out the exact code state at the beginning of, let's say chapter four, video two, we could simply run the command git checkout 04_02. And then, in order to check out the beginning, we would say _B. Now if you want to check out the code at the end of a given video, you can always just add _E for end instead. But anyway, once you've navigated to that branch, another thing that you're going to need to do is install the corresponding NPM packages into both the frontend and backend directories. And the way you do that is simply by saying cd front-end. That'll take you to the frontend folder where you can run npm install, which will install all of the corresponding NPM packages into the frontend. And once that's done, you're going to do the same thing for the backend by changing directories back into the surrounding directory with cd .., and then you're going to change into the backend directory and run the same command, npm install, which will install all of the backend NPM packages for you. And that should be all you need to do. So now that you know how to work with Codespaces, you can follow along with me as we write this full-stack app.