Skip to content

Commit

Permalink
Merge pull request #65 from jeremy-brenner/master
Browse files Browse the repository at this point in the history
using parseint when setting port for replicaset to avoid error
  • Loading branch information
afloyd authored Apr 17, 2017
2 parents 6276aea + 7715fcc commit eb22dc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getReplicaSetServers(opts, mongodb) {
var replServers = opts.replicaSet.map(function(replicaSet) {
var split = replicaSet.split(":");
var host = split[0] || 'localhost';
var port = split[1] || 27017;
var port = parseInt(split[1]) || 27017;
return new mongodb.Server(host, port);
});
return new mongodb.ReplSet(replServers);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mongodb-migrate",
"version": "2.0.1",
"version": "2.0.2",
"description": "Migration framework for mongo in node",
"keywords": [
"mongo",
Expand Down

0 comments on commit eb22dc2

Please sign in to comment.