I am creating passport authentication for node using mongoose. I don't have any collection called "users" in my database. But while creating new user using the schema like below
var mongoose = require('mongoose');
module.exports = mongoose.model('User',{
id: String,
username: String,
password: String,
email: String,
firstName: String,
lastName: String
});
It will automatically creates new "users" collection. How is this possible?