-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear on how to use version 2 #198
Labels
Comments
Example:
|
This really should be the first page of the readme lol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not clear on how I can get ground:db 2 to work. The version that's on Atmosphere works for me, to the extent that not all my grounded collections have persistency. I very much want to move to the current release candidate. However, I can not get it to work.
So, how to set up ground:db in its current version?
Below is what I understand.
In, say, /imports/api/ I define the collections that need publishing, so, e.g.
In /server/main.js, I include the above, like so:
import '../imports/api/cities.js'
I should now be able to manipulate Cities in /server/main.js.
In /client/main.js, I want to have a grounded version of Cities. For example, like so:
However, now, querying GroundedCities (for example with GroundedCities.find().fetch()) generates a client side error, as if the collection is not defined.
How to resolve this?
Additionally, any methods for Cities are not defined for GroundedCities. So, does this imply that I should write my code such that, on the client, writes are performed on Cities, while reads are performed on GroundedCities?
Does that mean the client also needs to subscribe to Cities, besides GroundedCities having been defined, client-side?
The text was updated successfully, but these errors were encountered: