-
Notifications
You must be signed in to change notification settings - Fork 374
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
Counter SDK for backend services like "node.js" #28
Comments
Hi I made a quick work around function from the SDK to let this extension work on javascript Firebase functions.
It may not be the best solution yet but works. |
XFN Team: Would this be an additional "client" in the project, or would it be appropriate to adapt the web script to work in a Node environment? |
Duplicate: #55 |
I think it would be better to adapt the web script to work in a Node environment. I have tested the above code, and it triggers the aggregation function every time the "test" onCall function is called. |
Won't increment provided by admin sdk work for distributed counter tasks? |
@voxelbusters |
We're not planning an official implementation for any other clients at this time, and we've changed the name of the "Web Client SDK" to "client sample" to try to make that a little more clear. The typescript sample implementation is a good starting place for a node.js implementation of the counter. In the future, I'd like to see how much of this logic we can move off of the client and into something like a callable function that's installed by the extension itself. |
Extension name
This feature request is for extension: \firestore-counter
What feature would you like to see?
Make the
sharded-counter.js
work not only for the frontend but for backend services likenode.js
. This requirement includes not to depend on requiring / importingfirebase/app
andfirebase/firestore
in the user code, but on the SDK code instead.How would you use it?
In our case, we use a backend service to make our web site cleaner and lighter without Firebase SDK, so, all the usage of Firebase occurs in the backend. We would like to use the counter so that's why we need to use it on the backend.
The text was updated successfully, but these errors were encountered: