I was wondering how would I be able to push data from my sign-up schema to a specific collection in my mongodb server. I am working with PassportJS and I created a method for users to sign-up but it doesn't seem to be saving to my database. would anyone be able to help me with this?
var mongoose = require('mongoose');
var schema = mongoose.Schema;
var usersSchema = new schema ({
name: String,
username: String,
email: String,
password: String
});
mongoose.model('users', usersSchema, 'users');