I want to do some calculation based on aggregation query (sum, group etc). However I found out that I cannot do this by directly using the Meteorjs collections.
I am thinking of connecting the the database directly and use the normal MongoDB query (the one that can be used in the Mongo shell) and use the result to construct an object and return it to the client side.
How can I do this? Do I need to declare the connection like an external js script to connect to the database or there is already shortcut for this; for example calling some method to connect to the current Meteorjs database etc.
Also, what is the best practice?