Question

I'm trying to store a directory structure, including files and their content, in MongoDB. The work is part of a synching app, and is using in Node/Mongoose.

Now, I'm new to Mongo, and it's late here - is the idiomatic implementation as easy as it looks - ie, something like this?

var FileStoreSchema = new Schema({
  fullPath: {
    type: String,
    index: { unique: true }
  },
  filename: String,
  [Metadata and other useful fields]  
});

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top