Skip to content

Connection

Shodiqul Muzaki edited this page Feb 12, 2016 · 4 revisions

Initialization

Edit file config.json

connection : {
 "host" : "localhost",
 "port" : 27017,
 "db" : "cermai",
 "user" : "",
 "pwd" : ""
}
  • host : host mongodb
  • port : port on mongodb
  • db : your database project
  • user : user on mongodb
  • pwd : password on mongodb
  • members : member of replica mongodb

Using Replica

just add simple code like this on connection

"members" : [
 {
   "host" : "localhost",
   "port" : 27018
 },
 {
   "host" : "localhost",
   "port" : 27019
 }
]

Clone this wiki locally