Mongo client unable to load js file

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      1) [narayana@xeon mongodb-linux-x86_64-rhel62-3.2.1]$ pwd
      /tmp/mongodb-linux-x86_64-rhel62-3.2.1
      2) [narayana@xeon mongodb-linux-x86_64-rhel62-3.2.1]$ cat myReplicaSetConf.js
      {
      "_id" : "rs0",
      "version" : 1,
      "members" : [

      {"_id":0, "host": "localhost:27017"}

      ,

      {"_id":1, "host": "localhost:27018"}

      ,

      {"_id":2, "host": "localhost:27019"}

      ]
      }

      3) bin/mongo --nodb --port 27017 myReplicaSetConf.js

      Error

      [narayana@xeon mongodb-linux-x86_64-rhel62-3.2.1]$ bin/mongo --nodb --port 27017 myReplicaSetConf.js
      MongoDB shell version: 3.2.1
      2016-01-31T15:12:38.206+0530 E QUERY [thread1] SyntaxError: missing ; before statement @myReplicaSetConf.js:2:8

      failed to load: myReplicaSetConf.js

            Assignee:
            Unassigned
            Reporter:
            Narayana B
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: