I have a moderate-sized node service that offers a bunch of endpoints. Here is how the folder structure looks like (somewhat).routes/ # all routes go here models/ # e.g. user, occupation utils/ # all helper functions go here app.js ...I try to keep things separate, minimize dependencies and so on. How do you go about writing and organizing such services e.g. create classes (?), write in Typescript instead of Javascript.I often see some C#/.NET project repos and get amazed on how EVERY damn thing is a class. This makes me wonder if I'm organizing my node APIs wrong and should the models/ be classes/interfaces.If you have any example/resources to share about writing production-grade APIs in node, that would be super valuable.
Submitted July 13, 2019 at 08:15PM by vanillacap
No comments:
Post a Comment