Let me know what you think about this video. As always, feel free to write a comment if you want me to cover a particular topic
@jacksonlloyd15194 жыл бұрын
Great Video! Do you think Yup is a bad idea to mix with typescript? Seems like you'd be validating the already defined type
@jgoebel4 жыл бұрын
thanks, I'm glad you like it 👍 I think Typescript the benefit of this library is certainly not as big as with plain JS because with Typescript you can already define the types of the incoming payload. However, it could be useful to do some custom validation (validating that a string has a specific length or matches a Regex, is not null and so on). If I were to start a new Typescript project, I'd probably try to get along without it first and then when there is a need for more fine-grained validation, then it would probably make sense to use it.
@RicksSolutions4 жыл бұрын
Congratulations, or as they say here in Brazil, "Você está de Parabéns"... very good
@jgoebel4 жыл бұрын
thanks 👍
@patrykszindler72152 жыл бұрын
You're amazing, thank you for such good content that is for free... :)
@jgoebel2 жыл бұрын
You're very welcome!
@pradeepasandaruwan48963 жыл бұрын
Thank you so much
@jgoebel3 жыл бұрын
You're most welcome Pradeepa 👍
@arifali10634 жыл бұрын
Great video always teaching us something useful, thanks for everything
@jgoebel4 жыл бұрын
glad you enjoyed it 👍
@joeygarcia78262 жыл бұрын
Nice video! I'll be looking for that Dependency Injection video!
@jgoebel2 жыл бұрын
I already created a series about dependency injection: kzbin.info/www/bejne/iqnblaScnbKIpKs
@deveshteotia51793 жыл бұрын
Very Informative, Great Work.
@jgoebel3 жыл бұрын
thx devesh, I'm glad you found it useful 👍
@ghumakkad_baccha3 жыл бұрын
Great . I just felt its only for me. :) thanks you so much
@jgoebel3 жыл бұрын
you're welcome Satyendra 👍
@igorpavlenko4114 жыл бұрын
great video man, easy explanation
@jgoebel4 жыл бұрын
Thanks, I'm glad you liked it 👍
@murilovercellino4 жыл бұрын
Great video! Congrats
@jgoebel4 жыл бұрын
thx
@douglasricardo91294 жыл бұрын
Amazing, I have been studying node for a while, and for sure your content is on the top list. Thanks for sharing such good knowledge. What you commonly use for document an API? openSwagger or another tool. What are your thoughts about moving from express to KOA or other library? Could you indicate some good books about node. And again AWASOME. Thanks a million.
@jgoebel4 жыл бұрын
thanks, I'm glad you like it. 1. Yes Swagger / Open API is actually my preferred tool, simply because it is quite easy to maintain. The only thing to always remember is to not expose the Swagger when you run in prod 2. I've never used Koa, express could do everything out of the box and that's why I haven't looked at it so far 3. I haven't looked at books when I got into Node, simply because I found that most of them were quite incomplete or outdated. I basically tried to learn Node and then tried to transfer best practices I knew from other technologies over to Node (like having a service layer for example. I think I can recommend to official express documentation though
@rao180677Ай бұрын
Nice. But I'm looking for a way to generate that schema from an open api spec. This way, it would all depend on the spec. Is there a way to do it?
@codinginflow Жыл бұрын
Would you repeat the validation logic in Mongoose's model (using the inbuilt validator functions) or is that obsolete with this approach?
@jgoebel Жыл бұрын
Hi Florian, my preferred approach is to fail as early as possible, so if there are issues with the received payload, it should fail right away. In this case, you also do not need validators in Mongoose which would duplicate the validation logic and which would be harder to maintain
@codinginflow Жыл бұрын
@@jgoebel Yea I came to the same conclusion. Thank you very much 👍
@RicksSolutions4 жыл бұрын
Very good ... and how would you do for the function to validate the data sent by parameter ? Id for example...
@jgoebel4 жыл бұрын
you can use yup's test method to write a custom validation: github.com/jquense/yup#mixedvalidatesyncvalue-any-options-object-any
@harikrishnan-pr6qk3 жыл бұрын
Great Video. Is this approach we get only single error back after validation when the request body actually has many errors. How to validate all fields and return all errors by using yup validation? Is it possible?
@jgoebel3 жыл бұрын
Hi hari, you can set abortEarly to false and then it will return all validation errors. I totally agree that this is better and that this should be the default behaviour. github.com/jquense/yup/issues/44
@makeit_studio4 жыл бұрын
thank you very much sir! can you please open repository for this video?
@jgoebel4 жыл бұрын
sure, sry forgot to make it public. Should be good now
@makeit_studio4 жыл бұрын
@@jgoebel thanks againn
@IranzinhoBRG4 жыл бұрын
The github repo isn't available anymore. Good video btw
@jgoebel4 жыл бұрын
Sry for the inconvenience. I forgot to make the repo public. Now it is public.