data created from mongoose not showing on mongodb
<p>I have a question related to mongodb..
currently, I am building rest api using node.js and express.js for android app. For database, I am using mongodb and mongoose... The problem I am having is that I can insert and print data using mongoose but it seems like the data inserted using mongoose not showing on mongodb.. </p>

<p>What I tried is that I ran mongod and the server.js on the command line and inserted data using mongoose. And then, on the command line, I opened mongo --> use &lt;dbname> --> db.&lt;dbname>.find() shows nothing.. What did I do wrong?? Running mongod and the server.js on localhost</p>

<p>-- edit</p>

<pre><code>passport.use('signup', new LocalStrategy(
    {
        usernameField : 'email', // the name of username that got passed into this strategy
        passwordField : 'password', // the name of the password that got passed into tis strategy
        passReqToCallback : true
    },
    function(req, email, password, done) {
        // done(...) where ... is (err, user, info)
        process.nextTick(function() {
            // find user with username
            User.findOne({ email : email }, function(err, user){
                if(err) return done(err);
                if(user) return done(null, false, { message : 'User already exists.' });

                // save the user
                var newUser = new User();
                newUser.email = email;
                newUser.password = newUser.generateHash(password);

                newUser.save(function(err) {
                    if(err) return done(err);
                    return done(null, newUser);
                });
            });
        });
    }
));
</code></pre>

<p>I am using passport for authentication and here I am inserting new user. I tried to print out all users by doing </p>

<pre><code>User.find({}, function(err, users){
                console.log(users);
            });
</code></pre>

<p>just try to see that the new user is inserted.. and I see that all users from the log... however, if I go to command line mongo and do db.User.find(), I don't see anything..
Thanks!</p>