1 files changed, 8 insertions, 1 deletions
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();
|