Please just help clarify whats happening inside these two function. I'm a bit more comfortable with mongoose as well. If you can provide a mongoose a equivalent that would be great as well.
router.put('/api/todos', function (req, res){
…
I'm trying to add a new message (with key "3") to the nested "messages" document but $addToSet or $push won't work. Is it possible to push a new message element to such a structure? In the beginning the messages property was an array but my mongodb…
i'm new to NodeJS and i'm using MongoJS to connect to my database.
All is working fine, but when i use db.collection.find() function, it returns only the first 10 results on the database.
function listMessages(from,to){
console.log("[REQ] User…
I have a node server and until now my database was local, but now I need it to be on mongolab.
Could you tell me how to connect to the database, please?
I am trying to query my mongoDB database in my MEAN Stack web application by sending in a POST request with the values I want to find in the database.
Here is what I'm doing :
app.post('/api/persons',function(req,res){
console.log("I received a…
I was trying to install mongojs by this command:
npm install mongojs
but there are coming so many errors .
https://www.youtube.com/watch?v=763oFTm4pnU
So,i restarted my pc and tried installing again but same errors are coming .
but i still tried to…