Closed sungwoncho closed 8 years ago
+1. It's exactly what i did. I like this structure. One file for each collection, it's easy to find all the stuff about a collection.
Yep. This is exactly the same approach I took too.
This seems like a good approach.
I would like to use aldeed:collection2 to add validations. Where do schemas belong?
If I simply put them in
/libs/collections.js
, and I have a multitude of collections, I am afraid it would be hard to maintain all schemas.Edit
just had an idea:
libs/collections/index.js
And define schemas in each
/libs/collections/posts.js
,/libs/collections/comments.js
, ... files.