findandを使用してみfindOneましたが、どちらもドキュメントを返しません。findは空の配列を返していますが、findOneは を返していnullます。errどちらの場合もnull同様です。
これが私の接続です:
function connectToDB(){
    mongoose.connect("mongodb://localhost/test"); //i have also tried 127.0.0.1
    db = mongoose.connection;
    db.on("error", console.error.bind(console, "connection error:"));
    db.once("open", function callback(){
        console.log("CONNECTED");
    });
};ここに私のスキーマがあります:
var fileSchema = mongoose.Schema({
    hash: String,
    type: String,
    extension: String,
    size: String,
    uploaded: {type:Date, default:(Date.now)},
    expires: {type:Date, default:(Date.now()+oneDay)}
});
var Model = mongoose.model("Model", fileSchema);そして私の質問はここにあります:
Model.find({},function(err, file) {
    console.log(err)
    console.log(file);  
});データベースにアップロードしてRockMongo経由で見ることはできますが、後で取得することはできません。MongoDB を使用するのはこれが初めてなので、いくつかの基本事項が欠けていると思います。正しい方向へのプッシュは素晴らしいでしょう!