Тёмный

Node.js Project Structure and Architecture Best Practices 

Software Developer Diaries
Подписаться 25 тыс.
Просмотров 20 тыс.
50% 1

What are the best practices when setting up a Node.js app in terms of its folder structure and architecture? Let's take a look at that and other things such as monitoring, testing, logging, and so on.
======⚡⚡⚡======
Consider becoming a member of the channel ❤️
🙌 Become my Patreon and get exclusive perks: / softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: / gusgadirov
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
Contract Testing: • How does eBay utilize ...
🕒 Timestamps:
(00:00) 3-Layer approach
(03:17) Folder structure
(04:14) Monorepos and libs
(04:57) Pub/Sub
(05:34) Tests
(06:16) Logging and monitoring
(06:55) Coding practices
And don't forget to subscribe for more videos like this 😊

Наука

Опубликовано:

 

1 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@gosnooky
@gosnooky 3 месяца назад
NestJS provides a seamless implementation of the 3-layer architecture. I recommend using it for anyone not wanting to re-invent the wheel.
@Jarjarniks
@Jarjarniks 5 дней назад
Would have loved to be able to see this repository and investigate the routes, services, controllers etc in more detail. Thank you for the great video nonetheless!
@aurobindobhuyan2107
@aurobindobhuyan2107 18 дней назад
For Logging and Debugging, I use Morgan and Winston. The best part is you can combine it together to have the best o/p.
@BarakAlmog
@BarakAlmog 3 месяца назад
Great video. Thanks so much! Second or third time that I'm watching it. Appreciate it!
@maximus4510
@maximus4510 8 месяцев назад
That was informative for sure
@dailypromos6477
@dailypromos6477 6 месяцев назад
Thank you for sharing!!
@yunyang6267
@yunyang6267 8 месяцев назад
Could you show us how to properly deploy a microservices architecture like this with several services and monitoring service to AWS or some other cloud proviiders? I think it'd be a great video
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Great suggestion!
@SayfSentinel
@SayfSentinel 8 месяцев назад
i use almost an identical approach, it would be great to have this folder structure and a bit of code to understand the logic behind it in a github repo! very nice analyze, you got a subscriber with a ringbell activated :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
I couldn’t really go into code due to time constraints but thank you for the feedback 😉 And happy to have you here!
@rjwhite4424
@rjwhite4424 3 месяца назад
Video was super helpful! I'd love to see a tutorial where you make a simple api from start to finish showing how to correctly use the 3-layer approach
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 3 месяца назад
Thanks! I’ll try to follow that pattern in future videos 😉
@yutsacarm8021
@yutsacarm8021 2 месяца назад
really good content
@codewithyaji
@codewithyaji 8 месяцев назад
Very helpful vidoe of node developers.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Glad to hear that!
@aurobindobhuyan2107
@aurobindobhuyan2107 18 дней назад
Glad I'm following the same folder structure. 3layer structure 😅😅
@isuckatthisgame
@isuckatthisgame 8 месяцев назад
I typically implement a DAL (Data Access Layer) to mediate between a service and a database in my architecture. Within the model layer, I maintain class definitions that represent database entities, which I refer to as entity models. My approach can be seen as a sort of 3.5-layer architecture, as the model layer doesn't have direct communication with the database. 🙂 Anyhow, thanks for explanation.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Interesting, thanks for sharing :)
@code_react
@code_react 8 месяцев назад
For this reason i really love to use Nestjs. Which is using 3 layer approach. And also you can have modules for each different tasks.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Good point!
@madhavanand756
@madhavanand756 4 месяца назад
Make a video upon how to do testing, unit testing etc. And also best practice to implement logs. Superbbbb content dude. I was looking for this from sooo long. Up for any support if needed.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 4 месяца назад
Will do, buddy. Thanks for the nice words! 😊
@onstn4129
@onstn4129 3 месяца назад
Thank u ❤
@bautistavicens7870
@bautistavicens7870 2 месяца назад
Could you apply Design Patterns, like Strategy, in node projects like the one in the video, with router, controllers and services? I´ve seen it and applied it in Java projects, but with POO paradigm. So, i´m in doubt if it is a good practice or not, to use it in node projects with this kind of paradigm.
@paperC_CSGO
@paperC_CSGO Месяц назад
Please do a video on monorepos!
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Месяц назад
Already have one! 🙂
@samueltheophilus1779
@samueltheophilus1779 5 месяцев назад
Love your videos man. What tool do you use to make these boards
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 4 месяца назад
It’s Excalidraw :)
@ramdoni3935
@ramdoni3935 8 месяцев назад
good explaine next content please Go-lang :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Ohh I'd first need to learn Go :D
@achrefnabil2463
@achrefnabil2463 8 месяцев назад
Can you share microservices/serverless/SOA/monolith folder structure
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
I’ll consider those in future videos 🙂
@ajmaln73
@ajmaln73 Месяц назад
can u share the codebase link in the description?
@lnard0
@lnard0 Месяц назад
Hello, Do you still got the repo for this?
@nj-neeraj8985
@nj-neeraj8985 3 месяца назад
I have class based routers and controllers and models are seperate...I generated them using sequelize cli
@MoaathAlattas
@MoaathAlattas 8 месяцев назад
it would be great to complete this with `Analytics`, `Continuous Integration (CI)` and `Deployments (staging/production)`
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Good point!
@ericsiddiq7634
@ericsiddiq7634 2 месяца назад
is it possible to get this project source code?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 2 месяца назад
Unfortunately not for this one, sorry 🥲
@khaledsanny4817
@khaledsanny4817 5 месяцев назад
We want to read your code 😊
@lardosian
@lardosian 8 месяцев назад
FYI...sounds like you might have some kind of automated video or audio editing, seems to cut off some words in parts of your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 месяцев назад
Exactly, it’s a feature in Filmora that removes silent parts of the video :)
@lardosian
@lardosian 8 месяцев назад
@@SoftwareDeveloperDiaries Sounds like it needs tweaking because its removing parts of words, possibly a gate setting.
@shreshthverma1535
@shreshthverma1535 4 месяца назад
can you share the repo of this project
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 4 месяца назад
Unfortunately there's no code for this one :/
@shreshthverma1535
@shreshthverma1535 3 месяца назад
any example repo??@@SoftwareDeveloperDiaries
@whysohypocritical
@whysohypocritical 6 месяцев назад
I wish you could share the code for your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 6 месяцев назад
I will do my best to do that in the future videos!
@maksymshyshkov2787
@maksymshyshkov2787 Месяц назад
good video. sorry for changing 666 thumbs up to +1 )) but I can't just pass by
@korkut31
@korkut31 2 месяца назад
huseyin baskan r harflarini cok vurgulu soyluyorsun dinlemek yorucu oluyor. haberin olsun. basarilarinin devamini dilerim
@frankr919
@frankr919 7 месяцев назад
😒 'promosm'
Далее
I need your help..
00:28
Просмотров 4,7 млн
МЯСНОЙ ЦЕХ - Страшилки Minecraft
37:24
Solving Common Backend Issues: Deadlocks & Queues
3:33
REST vs GraphQL vs gRPC
6:10
Просмотров 334
Dynamic Components in Vue
14:30
Просмотров 4,1 тыс.
I tried ranking Node.js Design Patterns
10:35
Просмотров 5 тыс.
Power up all cell phones.
0:17
Просмотров 49 млн
SAMSUNG S23 ULTRA🔥
0:47
Просмотров 144 тыс.
What’s your charging level??
0:14
Просмотров 7 млн