1

how to connect database with javascript?

mongodb with some example? or mysql?

mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]]` `[/[database][?options]]

performance of this databese which can be used in a tcp server?:

~/$ ./mongod

db.adminCommand({movePrimary:, to:})

  //enable sharding on the database, and move it to the shard01

use test1 //new database db.adminCommand({enablesharding : "test1"}) db.adminCommand({movePrimary : "test1", to : "shard01" }) //This will affect new collections on the test1 db //enable sharding on the database, and move it to the shard01 use test1 //new database db.adminCommand({enablesharding : "test1"}) db.adminCommand({movePrimary : "test1", to : "shard01" }) //This will affect new collections on the test1 db

Community
  • 1
  • 1

1 Answers1

0

I realize you may have figured this out by now, but check this link out:

http://docs.mongodb.org/ecosystem/tools/http-interfaces/#simple-rest-api

You should be able to access MongoDB via ajax calls in Javascript and receive JSON objects as your response.

afithings
  • 691
  • 1
  • 9
  • 16