I have a very basic question, I tried google but I cant really find anything.
I'm trying out mongoose js and I was wondering how you go about updating a live application.
Say for example I have defined a schema in my node.js application, and inside my app.js file somewhere:
...
var LibrarySchema = new mongoose.Schema({
address: {type: String, required: true},
books: [{
title: {type: String, required: true}
}]
});
var libraryModel = mongoose.model('Library', LibrarySchema);
...
Now I've run the server on some AWS instance somewhere in the cloud. Users are on there, using the site. At some point I decide that every book should have an ISBN number, so I need to update the Schema.
Now what are my options? Do I edit the app.js file on the server then restart the node js app? Or is there a way to edit schemas while in production in a way that minimizes downtime?
Thanks!!