We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d3aee commit db096ceCopy full SHA for db096ce
chapters/databases/mongodb.md
@@ -23,7 +23,7 @@ mongo = require 'mongodb'
23
24
server = new mongo.Server "127.0.0.1", 27017, {}
25
26
-client = new mongo.Db 'test', server
+client = new mongo.Db 'test', server, {w:1}
27
28
# save() updates existing records or inserts new ones as needed
29
exampleSave = (dbErr, collection) ->
@@ -43,7 +43,7 @@ mongo = require 'mongodb'
43
44
45
46
47
48
exampleFind = (dbErr, collection) ->
49
console.log "Unable to access database: #{dbErr}" if dbErr
0 commit comments