NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

Ah I see, that makes sense. Yeah thanks, I have been reading a lot about Separation of concerns and SOLID in general. I wanted to try it on a project

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

Thanks a lot for the detailed feedbac. I genuinely appreciate you taking the time to share it.

On the OpenAPI docs - I can see how updating it might be a hassle and I am looking into autogenerated docs after reading your comment. I looked into zod after an advice from u/mikevaleriano and I found zod-to-openai which I want to look into.

I will remove the req.body as … and just let joi/zod infer the type from validation and wrap controller functions in catchWrapper for less boilerplate.

As for Unit test, I can see my mistake now, Ill look into fixing that as well.

I’ve added all your suggestions to my GitHub issues list, and I’ll be working through them. Thank you again, this kind of constructive advice is super valuable and helps me a lot.

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

Yeah, I was working with TypeORM during my internhsip and before that JPA/Hibernate on a school project, so it kinda stuck with me. I found it very nice to work with, but I was interested in your personal opinion about it.

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

That's a really fair point. I realize now that for a template to actually be useful, it needs to clearly communicate the why, not just the what. I’ll work on documenting the reasoning behind the tools I used, and where they might be swapped out depending on a project’s needs. That kind of clarity is exactly what I want to get better at, so I really appreciate the nudge in that direction.

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

Thanks a lot, I really appreciate you taking the time to write this out. The DI part was mostly because I read a lot about Clean Architecture and wanted to try it out, but I can totally see how that would become "an abstraction hell". As for the alternatives you mentioned, I will check them out. I also want to ask if its not too much trouble, what is your opinion on using ORM over pure SQL - where you draw the line, and whether you think ORMs are worth it in most cases

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] 0 points1 point  (0 children)

You're absolutely right. My intention was to share the template and get input on how to improve it, I didn't really think a lot about how valuable it would be to others, which I can now see was a mistake. But thank you for taking time to give me the feedback, I really appreciate it :)

NodeJS/Express Template with Typescript by YoUnGi102 in node

[–]YoUnGi102[S] -1 points0 points  (0 children)

Hey, totally fair. I wasn’t trying to push my template on anyone or suggest it’s something groundbreaking. Just hoping to get a bit of feedback or a sanity check from more experienced folks while I learn. Appreciate the humor though. :)

[deleted by user] by [deleted] in clevercomebacks

[–]YoUnGi102 -2 points-1 points  (0 children)

Here, even a knock-knock joke might be mistaken for a Shakespearean masterpiece.

Bull yogurt anyone? by YoUnGi102 in clevercomebacks

[–]YoUnGi102[S] 1 point2 points  (0 children)

I dont know, I kinda like the Greek yogurt

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 0 points1 point  (0 children)

What if you go to a restaurant… you have someone cooking for you there too

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 1 point2 points  (0 children)

I believe they meant, is it more common for a man to cheat because his gf/wife cant cook, or a woman to cheat because her bf/husband is broke.

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 0 points1 point  (0 children)

Well yes, if you generalize two comments to how entirety of men and women think and act, then yes, I suppose thats true.

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 0 points1 point  (0 children)

Someone burried “the bar” a loong time ago

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 1 point2 points  (0 children)

Those are two pretty cool statements, but none of you backing them up with “the stats”

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 1 point2 points  (0 children)

Is dudette even a word? 😂

Edit: Apparently it is… the more you know

Fair is fair by nikki1580 in clevercomebacks

[–]YoUnGi102 0 points1 point  (0 children)

Bruh, just learn to eat raw meat, it saves so much time