How to use the mongoomise.promisifyAll function in mongoomise

To help you get started, we’ve selected a few mongoomise examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sx1989827 / DOClever / Server / model / testModel.js View on Github external
},
    id:String,
    user:{
        type:mongoose.Schema.ObjectId,
        ref:"User"
    }
},{
    timestamps:true,
    minimize: false
});
model.configOutputField(null,[
    "createdAt",
    "updatedAt"
]);
var dbManage=db.model("Test",model);
mongoomise.promisifyAll(dbManage,require("bluebird"));
module.exports=dbManage;
github sx1989827 / DOClever / Server / model / docProjectModel.js View on Github external
type:Number,
        default:0
    },
    public:{
        type:Number,
        default:0
    }
},{
    timestamps:true
});
model.configOutputField(null,[
    "createdAt",
    "updatedAt"
]);
var dbManage=db.model("DocProject",model);
mongoomise.promisifyAll(dbManage,require("bluebird"));
module.exports=dbManage;
github sx1989827 / DOClever / Server / model / pollModel.js View on Github external
default:","
        },
        contentParam:{
            type:String,
            default:""
        }
    }
},{
    timestamps:true
});
model.configOutputField(null,[
    "createdAt",
    "updatedAt"
]);
var dbManage=db.model("Poll",model);
mongoomise.promisifyAll(dbManage,require("bluebird"));
module.exports=dbManage;
github sx1989827 / DOClever / Server / model / infoModel.js View on Github external
default:""
        },
        authDb:{
            type:String,
            default:""
        }
    }
},{
    timestamps:true
});
model.configOutputField(null,[
    "createdAt",
    "updatedAt"
]);
var dbManage=db.model("Info",model);
mongoomise.promisifyAll(dbManage,require("bluebird"));
module.exports=dbManage;
github sx1989827 / DOClever / Server / model / groupModel.js View on Github external
default:0      //0 普通 1 回收站
    },
    id:String,
    parent:String,
    delete:Number,
    sort:{
        type:Number,
        default:0
    },
    remark:String
},{
    timestamps:true
});

var dbManage=db.model("Group",model);
mongoomise.promisifyAll(dbManage,require("bluebird"));
module.exports=dbManage;

mongoomise

promisify mongoose by any promise library

MIT
Latest version published 10 years ago

Package Health Score

36 / 100
Full package analysis

Popular mongoomise functions