I am a C# .NET developer (15 years) and NodeJS developer (3 spotty /part-time years in small applications but falling in love). I am just getting into my first larger node project and am wondering if I am on the right track with regards to design patterns before I commit. Most of the examples we see on the web regarding node put much content into one file, this is done so we can easily follow a tutorial or example.
Right now, I have a desire to create my node application with many files, single responsibility, I am thinking as follows (the project is much different but this is an example most can understand):
/server.js // (requires /usermanager/index.js)
/usermanager/index.js //(requires all other files for user management)
I have created a project that have some success in the community https://github.com/dwyl/hapi-typescript-example
With this structure (feature base) and types its much easier to scale your code!
Let me know it you have any questions!