📜  quick.db 到 mongo db - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:33.499000             🧑  作者: Mango

代码示例1
const db = require("quick.db");
const { Database } = require("quickmongo");
const mongo = new Database("mongodb://localhost/quickmongo");

function importData() {
    const data = db.all();
    mongo.import(data).then(() => {
        console.log("Done!");
    });    
}

mongo.on("ready", () => importData()); // Importing data from quick.db