hboylan / express-mongoose-api-seed

28 stars 5 forks source link

[Question] Large application structure #1

Closed medbejimbj closed 6 years ago

medbejimbj commented 6 years ago

How to structure a large API REST (or application) that contains around 50 files in app folder ?

By type like this : Controller ---- Module1 ---- Module2 Models ---- Module1 ---- Module2

or by feature like this :

Module1 ---- Controller ---- Models Module2 ---- Controller ---- Models

hboylan commented 6 years ago

By type is okay for small/medium size apps but I typically use the feature model.

When using type for large apps, you’ll find it gets more difficult to locate files in subdirectories.

hboylan commented 6 years ago

@medbejimbj It's also worth noting that this seed project is fairly outdated. You'll get better results with a Yeaoman generator such as this.