Last active
October 12, 2015 14:22
-
-
Save rpechayr/782df4b8b270bde21d7c to your computer and use it in GitHub Desktop.
Different cases with down hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mongo' | |
#Here I don't have any mongod listening on port 29017 | |
client = Mongo::Client.new([ "127.0.0.1:29017", '127.0.0.1:27017' ], :database => 'test') | |
result = client[:artists].insert_one({ name: 'FKA Twigs' }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mongo' | |
client = Mongo::Client.new([ "8.8.8.8:27017", '127.0.0.1:27017' ], :database => 'test') | |
result = client[:artists].insert_one({ name: 'FKA Twigs' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment