Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

mongodb create database

var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/mydb";

MongoClient.connect(url, function(err, db) {
  if (err) throw err;
  console.log("Database created!");
  db.close();
});
 
PREVIOUS NEXT
Tagged: #mongodb #create #database
ADD COMMENT
Topic
Name
5+9 =