.save mongoose gives to feedback, but working on local docker

May 14, 2016 693 views
MongoDB Docker Node.js Ubuntu

Hey Guys,
i am currently running 3 docker containers on your cloud. (Node,Mongoose,Mongo,Expresser) am using to docker on click installation on digital ocean.
When am running them locally everything is fine. But on your cloud the setup isn't working, explicit when saving an object to the database. Mongo isn't creating anything here, all console.logs outside the callback getting called but no object are saved in my db.
But on local docker it works and i can see the objects in my db.
Here is an image

    console.log("user: " + user);
        user.save(function (err) {
        //start of part, that doesn't gets called
     if (err) console.log(err); 
    else console.log('yessss'); 
        console.log("User saved successfully!");
        //end of part, that doesn't gets called
        });
    console.log("user should be saved now");

That "save" function who make this trouble isn't written by me btw,
its the mongos implemented.

Console logs this: ( no errors)

node1 | user: { score: 0,
node
1 | appInstalled: false,
node1 | profilePic: 'profilePicLink',
node
1 | name: '015735412587',
node1 | _id: 'Vorname Nachname' }
node
1 | user should be saved

But in the end there is no user in my db as it is on my docker server running locally
I wonder if you could help me out here.

best regards

1 comment
Be the first one to answer this question.