U
U
UNy2018-05-14 22:55:04
MongoDB
UNy, 2018-05-14 22:55:04

How to populate Mongodb/Mongoose correctly?

let mobileScheme = new Schema({
    name: {
        id:{
            src:String,
            title:String,
            value:Number,
            about:String
        }
    }
});

let Mobile = mongoose.model("Mobile", mobileScheme);

I have sections with mobile phones, I want it to load phones from the database with ajax when clicking on a certain section. How to fill the database? Each time writing new Mobile will be tedious with a large number of phones. There are other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Tarkovsky, 2018-05-15
@maximtark

If you just need to hammer the base, then mongoose-dummy is perfect . The tool is fairly lightweight and can only work with bare mogoose circuitry.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question