Saving the results of an agregation pipeline into a text file

@steevej No – in the shell, async/await is implicit, and in both the shell and modern versions of the Node.js driver, db.test.aggregate() returns a Cursor object, not a Promise.

@Pietro_Simcic

This is the content of the file:

Did you override your data with my test data?

when I add the cusorAsStream.pipe(process.stderr); in this way :

There’s a typo in there (cusor, not cursor).

3 Likes