NestJs Course for Beginners - Create a REST API

NestJs Course for Beginners - Create a REST API

freeCodeCamp.org

2 года назад

1,129,190 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Code with Vlad
Code with Vlad - 22.02.2022 21:55

Thank you Beau!
I really enjoyed making this course, I hope that it will be helpful to anyone who wants to learn about NestJs! 😊

Ответить
Mahmoud Abdullah
Mahmoud Abdullah - 15.09.2023 15:06

Why don't you add the dubbing feature to Arabic?!!!

Ответить
Fernando
Fernando - 14.09.2023 20:46

What's the point of the config module if I can access process.env.VAR globally? I looked through the docs lightly, and the only benefit I could think of is caching, and when you want to use different envPaths. Even then, I have trouble understanding the benefit of envPaths because it says a variable takes on the first value it finds. That would mean that across different env files I would have to set a prefix to my env vars like DEV_ or QA_, which kind of defeats the purpose of the env files. What I mean by this is that the VAR_NAME should be the same across all files, just the value should change depending on environment. Maybe I misunderstood this? Thank you! Amazing video so far.

Ответить
Fernando
Fernando - 14.09.2023 05:51

So you're telling me that when I instantiate ValidationPipe with useGlobalPipes, it knows we have used class validator decorators within the Dto class automatically? Is this through type recognition in the route callback @Body() dto: AuthDto? Can you speak a little bit more on how this works? I'm not super familiar with proper backend design.

Ответить
Teddy Robinson
Teddy Robinson - 13.09.2023 10:04

9 minutes in and ready to take this long journey. I'll report back at the end!

Ответить
Mohammed M
Mohammed M - 08.09.2023 15:33

worst explanation , he writes code and remove it
first prepare you roadmap , explain why we do this with a brief example ,
when you copy something explain why we need it briefly don't just hardcode everything

as a beginners you are making everything harder
STOP EXPLAINING

Ответить
Nguyễn Đình Anh Tuấn
Nguyễn Đình Anh Tuấn - 07.09.2023 10:30

I am facing problem when creating docker-compose file, it come out just plain file without anything in it. Am also can't auto generate a module using nest g module nameModule because something was disable ? Can someone help me

Ответить
Adrian Ozuna
Adrian Ozuna - 05.09.2023 20:57

This tutorial has been amazing. Everythings been clearly explained at a not too fast not too slow pace and your accent is cool too!

Ответить
Nguyên Nguyễn Đặng
Nguyên Nguyễn Đặng - 05.09.2023 19:56

In get me api, why don't we creating user.service.js file to handle finding user logic but implement it in jwt.strategy.ts file? thank you very munch for this course and your answer

Ответить
Elvis Njoku
Elvis Njoku - 05.09.2023 15:04

I was thinking you will wrte the code completely before the end to end testing. Now, I am not sure how I can follow through to the end...😭

Ответить
Carl Joel Määttä
Carl Joel Määttä - 28.08.2023 01:26

Instead of using withHeader() to insert the bearer token in Pactum you could use the method withBearerToken() and provide the name from the stores, ie: ".withBearerToken('$S{userToken}')"

Ответить
Ana Elisa Marques Martins Ramos
Ana Elisa Marques Martins Ramos - 24.08.2023 23:21

What extension you use to have this icons?

Ответить
Kushagra Bansal
Kushagra Bansal - 23.08.2023 12:03

how did th first route became /auth/signup if we wrote path as /signup only??

Ответить
Buğra Otken
Buğra Otken - 21.08.2023 12:11

I have watched and also coded with tutors like 400 tutorials till today (I am counting the number =)) but this tutorial was one of the best tutorials I have ever watched by so far. Very neat, crystal, no questions in my mind, nothing like "tutor does something but you fail with the same code", very helpful. Thanks god there are streamers like Vlad!

Ответить
samz
samz - 11.08.2023 22:20

Very good one. I like when explain each small thing simply

Ответить
Tien Manh Nguyen
Tien Manh Nguyen - 11.08.2023 04:57

Hi thanks for wonderful tutorials. I'm working on the signup logic session and got suck in this problems. When I tried to post the user, the error said that my public.user table does not exist in the database. Do you have any ideas how to fix this? Thanks again

Ответить
Alex
Alex - 09.08.2023 17:56

I think it would be really helpfull to explain a bit more the Imsonia / Postman aspects. or mention them, bc I got stuck in a couple of moments. because I didn't notice that x field was different (POST from GET) or where to put the variables.

Great tutorial anyhow !!

Ответить
Anton Zhuravlev
Anton Zhuravlev - 30.07.2023 13:48

Great course!! (I'm in the middle of it right now)
The thing I dont get, is why do we need to import everything multiple times.
We create a prisma service. We import it in prisma module. We import the prisma module with that service into auth module. We import the prisma service into the auth module's service. Also, we need to additionally allow importing the service in another service.. I get feel that we importing everything at least twice...

Ответить
Serg Mayakov
Serg Mayakov - 28.07.2023 09:56

Good work

Ответить
MrGameTVCity
MrGameTVCity - 25.07.2023 20:29

Thanks for the guide! I learn Nest and this course is good for understanding and first experience

Ответить
HOLO-waifus ES
HOLO-waifus ES - 17.07.2023 23:30

I'm doing eveything as shown in the videp, except for Docker. I don't have enough RAM for that.

Ответить
Queerly__Coded
Queerly__Coded - 13.07.2023 20:35

I'm having some difficulties with the testing commands you made for the e2e section. individually each command works fine but if I try to use either the db:test:restart or db:dev:restart it tells me it can't find my localhost:<assigned port>. as I mentioned the prisma:<test/dev>:deploy, db:<test/dev>:rm, and the db:<test/dev>:up commands all work if I initialize them individually. Has anyone else come across this? I'm able to do the testing but not automate the commands the same way you have in your example.

Ответить
Prasad Pulaguntla
Prasad Pulaguntla - 12.07.2023 02:29

One of the best courses from Free Code Camp!!

Ответить
Nakul Nagariya
Nakul Nagariya - 08.07.2023 20:05

Some heads up fellow learners, I faced some issue: if you face issues, after changes to your schema, use npx prisma dev push, use import { Prisma } from "@prisma/client"; error instanceof Prisma.PrismaClientKnownRequestError for caching the error code.

Great course.

Ответить
Elvis Njoku
Elvis Njoku - 07.07.2023 18:09

My code was working very fine until I added the following in the package.json file as the video directed;

"prisma:dev:deploy": "prisma migrate deploy",
"db:dev:rm": "docker-compose rm dev-db -s -f -v",
"db:dev:up": "docker-compose up dev-db -d",
"db:dev:restart": "npm run db:dev:rm && npm run db:dev:up && sleep 1 && npm run prisma:dev:deploy"

The error I am having is Error: P1001: Can't reach database server at `localhost`:`5434`

Please make sure your database server is running at `localhost`:`5434`
How do I overcome this problem?

Ответить
jonathan becerra
jonathan becerra - 06.07.2023 23:37

I just switched from Rust/Axum to TS/NestJS. The developer experience with TS and NestJS is hands down beautiful.

Ответить
Ngọc An Hồ
Ngọc An Hồ - 06.07.2023 20:16

what tool to have color terminal like admin in video

Ответить
Vishwaroop Gupta
Vishwaroop Gupta - 06.07.2023 07:58

import { Module } from '@nestjs/common'; 201.6k (gzipped: 42.3k)

@Module({
imports: [AuthModule],
})

export class AuthModule{}

I am getting this error

Ответить
The Everyday Dev
The Everyday Dev - 03.07.2023 15:16

Followed and enjoyed every bit of this lesson! My journey to fullstack development starts here! Thank you!

Ответить
Ignacio Mustafha
Ignacio Mustafha - 27.06.2023 22:59

I own you 35 % of my salary lol

Ответить
Socheat OR
Socheat OR - 24.06.2023 11:05

Can you do a video with TypeOrm one more?

Ответить
newbie developer
newbie developer - 22.06.2023 06:20

thanks for the tutorial! anyone know any tutorials covers how you can test guards/decorators/interceptors, as its own standalone test or integrated with one of the e2e tests? been having a hard time finding these tutorials!

Ответить
Muhammad Rizwan
Muhammad Rizwan - 19.06.2023 09:54

it's bit late but i have one question, during e-2-e test npm run test:e2e it's giv me an error because the command first remove docker container testdb but it's not available how it will be resolve

Ответить
Octavian
Octavian - 15.06.2023 22:07

Thanks so much for this. I learnt a lot.
I notice on certain lines he uses await e.g on delete await this.prisma.bookmark.delete({...})
But not on update e.g return this.prisma.bookmark.update({...})
Can one use await when updating e.g const newBookmark = await this.prisma.bookmark.update({...}) ?
Assuming it's usually good practice to wait for the action to finish.

Ответить
魔法師
魔法師 - 14.06.2023 10:44

非常棒的课程,学习了。

Ответить
Victor Franco
Victor Franco - 09.06.2023 17:28

Amazing Course. Fantastic teaching way!

Ответить
Philippe Fanaro
Philippe Fanaro - 08.06.2023 21:26

Dope master class.

Ответить
Tomatte
Tomatte - 24.05.2023 16:27

You are an amazing teacher! Thank you so muuuuch!!!

Ответить
The Xeon Gamer
The Xeon Gamer - 23.05.2023 12:46

So I am confused about something, We are using NestJs with basically SQL running in docker? I am new to this btw

Ответить
Jesus A Barron
Jesus A Barron - 16.05.2023 10:10

Nice tutorial I am glad to find this, thank you sir, just one concern regarding Prisma cleanDb seems pretty risky

Ответить
Mubashir Hassan
Mubashir Hassan - 15.05.2023 00:14

Thank you so much for such a valuable tutorial <3

Ответить