I am creating passport authentication for node using mongoose. I do not have a collection called "users" in my database. But when creating a new user using the scheme as shown 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 create a new collection of "users". How is this possible?
source share