Mongoose save() is not a function
<p>In my app.js I require my model like</p>

<pre><code>var User = require('./models/user');
app.post('/user/add', function(req,res,next){
  var newUser = new User();
  newUser.add(req.body.name, function(response){
    res.json(response);
  })
});
</code></pre>

<p>and my model (user.js) look like this</p>

<pre><code>var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var userSchema = new Schema({
    name: String
});
var User = module.exports = mongoose.model('user', userSchema);
module.exports.add = function(name,callback){
    User.save({name:name}).exec(callback);
}
</code></pre>

<p>But I got error of newUser.add is not a function?</p>