获取您自己的 Node 服务器
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://:27017/";

MongoClient.connect(url, function(err, db) {
  if (err) throw err;
  var dbo = db.db("mydb");
  /*Return only the documents where the address starts with an "S":*/
  var query = { address: /^S/ };
  dbo.collection("customers").find(query).toArray(function(err, result) {
    if (err) throw err;
    console.log(result);
    db.close();
  });
});

              
[
{ _id: 58fdbf5c0ef8a50b4cdd9a8b , name: '理查德', address: '天空街 331' },
{ _id: 58fdbf5c0ef8a50b4cdd9a91 , name: '维奥拉', address: '侧街 1633' }
]