diff options
-rw-r--r-- | mds/oneclientforeverything.md | 2 | ||||
-rw-r--r-- | put_in_db.js | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/mds/oneclientforeverything.md b/mds/oneclientforeverything.md index 16fd640..e262815 100644 --- a/mds/oneclientforeverything.md +++ b/mds/oneclientforeverything.md @@ -16,7 +16,7 @@ I can't be bothered to have different clients open all the time. I want to have ## Two ways of solving this -There is generally two ways one can try to solve this. number one is to just use a browser. Almost all forms of comm nowadays have a web client so basically one way of solving our problem is to a dedicated browser that has all the clients open. Mind you, there are even specialized and more lightweight browser offerings specifically geared towards this use-case but still this option is not ideal in terms of resources and the interface you're getting is not really unified.<br/> +There is generally two ways one can try to solve this. Number one is to just use a browser. Almost all forms of comm nowadays have a web client so basically one way of solving our problem is to a dedicated browser that has all the clients open. Mind you, there are even specialized and more lightweight browser offerings specifically geared towards this use-case but still this option is not ideal in terms of resources and the interface you're getting is not really unified.<br/> ### The web app way diff --git a/put_in_db.js b/put_in_db.js index a9906a3..fadcc42 100644 --- a/put_in_db.js +++ b/put_in_db.js @@ -35,6 +35,9 @@ blogs = [ ]; // db.blogposts.insertMany([blog_entry_1, blog_entry_2, blog_entry_3]); -db.blogposts.updateMany(blogs, { - upsert: true, -}); +db.blogposts.updateMany( + { $set: blogs }, + { + upsert: true, + } +); |