meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Is Server directory necessary within the api directory? #238

Closed alvara closed 6 years ago

alvara commented 7 years ago

Just a quick question. Since the tests and publications are already being imported from the startup server directory, is there a reason to have another server directory within the api directory?

devagrawal09 commented 7 years ago

It is not necessary, but maybe it is considered a good practice, as it makes it clear to understand by developers who see the file structure that the files in the server folder are only for server use, while the other api files need to run at both client and server. Makes the structure self documenting.

I think it also ensures that the client code doesn't accidentally import those files.

hwillson commented 6 years ago

@devagrawal09 nailed it - thanks!