🎨 Body Parser error

This commit is contained in:
Flam3rboy
2021-02-02 00:51:00 +01:00
parent 7998b39757
commit 8505d9279b
14 changed files with 143 additions and 36 deletions
+3 -4
View File
@@ -1,4 +1,6 @@
import mongoose from "mongoose";
import { Long } from "mongodb";
import { Snowflake } from "../util/Snowflake";
async function main() {
const conn = await mongoose.createConnection(
@@ -9,10 +11,7 @@ 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();
const result = await conn.collection("users").insertOne({ test: Long.fromString(Snowflake.generate().toString()) });
// .project(undefined)
console.log(result);