dev-mastery / comments-api

MIT License
1.92k stars 649 forks source link

Design patterns #35

Open youssef-ggg opened 4 years ago

youssef-ggg commented 4 years ago

Is is possible to use your structure As a code for a full project or is this code style only good for micro services and if I am to add design patterns for a more complex project based on this architecture is this a good or bad idea ?

reggietheroman commented 4 years ago

Yes you can use this structure for a full project.

You would most likely want to make a couple of changes though. like maybe putting all your entities into a sub-directory.

As well as moving the loading of the express js routes out of the /index.js file (this depends on you, but remember that for each entity you add you will need more than 1 route).

As long as you keep the idea of the Clean Code architecture in mind, you shouldn't have any problems