[TL;DR] Just read the bits in bold.
I'm pretty new to Node.JS but have been getting on fine building some working projects. Now I have a burning question that I have been Googling for about half an hour but all I can find is frustratingly light-touch tutorials that don't answer my question, so here I go...
I have a Node.JS project that uses the Express framework. The code for one of the routes is getting pretty big now, so naturally my instincts as a good programmer are to break it out into it's own Class or Module or Package or whatever it is to be called.... and here lies my problem. Where is the tutorial about the language around Node.JS and how does one go about carving up their own code into neatly modulated, easy-to-read chunks?
It seems that every guide out there goes like this...
- Create a NodeJS project
- Install an npm module to the project
- Add a single line route that calls the module
- Pat yourself on the back and start applying for jobs as a full-stack JavaScript developer.
It's doing my head in! I wanna get deep and dirty with some complicated bespoke code but I also want to do things in some proper, standardised way but I don't know what folders to create, how to nest them, what naming convention to follow or anything like that. Where's the Jeff Way for NodeJS?
Please, someone point me in the direction of a good tutorial or some documentation around this subject so I can continue my learning. Thanks in advance.