As I understand it in meteor you can have a both
folder along with a lib
folder. Both folders hold code that are pertinent to both the client and the server, such as iron-router routes or meteor collection definitions. Is there a difference between the two folders or are they the exact same thing?
As I understand it in meteor you can have a both
folder along with a lib
folder. Both folders hold code that are pertinent to both the client and the server, such as iron-router routes or meteor collection definitions. Is there a difference between the two folders or are they the exact same thing?
- 1 both appears to just be a random name, if you name a folder aoth, its contents will load before both. so it would go lib then aoth then both. lib is a thing, but both is not a thing. – Alexander Mills Commented Feb 4, 2015 at 1:17
1 Answer
Reset to default 11Both code would act as the same thing, just the lib
folder would have a preference with regard to loading order.
Files in the lib
directory would be loaded first, before the ones in the both
directory. This can be useful for helpers and constants and stuff you need to be ready before anything else loads.