From 2026ea59112b89dd8829e23236fa482ef84a2e31 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 1 Feb 2021 21:49:01 +0100 Subject: :sparkles: added defaults to config --- src/test/mongo_test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/test/mongo_test.ts') diff --git a/src/test/mongo_test.ts b/src/test/mongo_test.ts index c4b3ec37..ad290198 100644 --- a/src/test/mongo_test.ts +++ b/src/test/mongo_test.ts @@ -1,7 +1,7 @@ import mongoose from "mongoose"; async function main() { - const mongoConnection = await mongoose.createConnection( + const conn = await mongoose.createConnection( "mongodb://localhost:27017/lambert?readPreference=secondaryPreferred", { useNewUrlParser: true, @@ -9,6 +9,13 @@ async function main() { } ); console.log("connected"); + const result = await conn + .collection("users") + .find({ $or: [{ email: "samuel.scheit@gmail.com" }, { phone: "samuel.scheit@gmail.com" }] }) + .toArray(); + // .project(undefined) + + console.log(result); } main(); -- cgit 1.5.1