0:00 So we're gonna use the Nest CLI heavily in this project, and we're 0:04 gonna start off by using it to generate our application. 0:07 If you don't have the Nest CLI, you can run npm install -g, for 0:11 global, js/cli@latest to 0:15 get the latest version. If you run into permission errors, 0:18 you need, you might 0:19 need to run the command with pseudo in front and enter your 0:22 password. With the Nest CLI installed, we are going to use it 0:26 by calling nest new, and I'll call it 0:30 chatterbackend to generate our new backend project with 0:33 NestJS. And I'm gonna use pnpm as my package 0:37 manager. 0:37 So we can CD into our new backend folder and 0:41 run pnpm run start:dev in order to 0:45 start up the development server, which will open up a port 0:49 on localhost:3000 for HTTP requests on our one 0:53 get route. Now, in backend VS Code, I want to add the 0:57 backend to our existing UI folders, so we can make 1:01 this a shared workspace. In VS Code, I can do this 1:05 by right-clicking and adding a folder to 1:08 workspace. 1:10 I'm then gonna go ahead and add the backend to this workspace. 1:15 And then lastly, I wanna save this workspace. 1:18 So we can go to File, Save Workspace As, and I'll 1:22 call this the chatter.codeworkspace and 1:26 save it in a directory that is convenient for me. 1:30 In this case, it's just gonna be adjacent to the backend 1:32 and UI folders. 1:33 So we have our backend, and like I said before, we have our 1:37 main.ts, which is listening for incoming HTTP 1:41 traffic on port 3000 as we bootstrap our app. 1:45 We have our app controller with the one get route, which will simply 1:49 return a "Hello, world" string. We can verify that everything's 1:53 working correctly by opening up Postman and submitting
The rest of the transcript is for members.
Sign in