I have a nodejs project and have created a database a collection and added some data.
The url for the creation of the database is: mongodb://localhost:27017/
Code here:
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();
});
I also have angular for the view side of it.
My question is:
Can I access the data in the mongoDB created from Angular using http module as it's normally done?
Would the target url I add in angular be mongodb://localhost:27017/
?