These commands are for MongoDB shell and not for the mongo db Node.js driver or mongoose package.
The examples here uses this sample dataset. Please, follow the instructions to setup the sample collection.
This is quick start for developers who want to a be up and running in no time.