Mongoose Encrypt Database Using Mongoose Encrypt Package

var secret = process.env.SOME_LONG_UNGUESSABLE_STRING;
userSchema.plugin(encrypt, { secret: secret });
Blue-eyed Beetle