summary refs log tree commit diff
path: root/src/test/mongo_test.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-01 21:49:01 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-01 21:49:01 +0100
commit2026ea59112b89dd8829e23236fa482ef84a2e31 (patch)
treec236474edb8e5a9f39193d518da2219759835bfd /src/test/mongo_test.ts
parent:globe_with_meridians: localization (diff)
downloadserver-2026ea59112b89dd8829e23236fa482ef84a2e31.tar.xz
:sparkles: added defaults to config
Diffstat (limited to 'src/test/mongo_test.ts')
-rw-r--r--src/test/mongo_test.ts9
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();