Hi everyone,I'm looking for finding the best practices for the design architecture of Node Programs. Currently whenever I am writing a node Application I have a directory structure like:app.js[app.js requires all modules from /classes and uses them to make API endpoints. All my .get .post .put .delete endpoints are all in one file.]/classes[All modules each using 1 mongoose schema and defining functions go in here]/util[Any sort of module I use for logic in special use cases]I'm looking for articles/github repositories demonstrating how this should properly be done such that everything is modular. Is instatiating an express server and then having all app.get app.post app.put app.delete methods in one file. For whatever reason it just seems wrong to me?To any more experienced devs who frequent /r/node, how do you handle this?
Submitted June 23, 2018 at 07:48PM by Equality7_2521_
No comments:
Post a Comment