1

I am new to moleculer framework. I want to use MongoDB's aggregate with moleculer framework it is possible ? Can anybody tell me how to write MongoDb's aggregate query in moleculer framework. Thanks in advance.

1 Answers1

0

It is possible to use mongoDB aggregate in moleculer, You just have to use MongoDB Adapter in mixins of the service as given in samples given in link to moleculer-db-adapter-mongo. Then in any action of that service you can access any methods like aggregate, find, count, etc as this.adapter.collection.aggregate([your aggregate query]).

Haris Umaid
  • 106
  • 1
  • 8