// Create a a file named helper.js to convert plain password into hashed password as well compare it at the time of login - //helper.js import bcrypt from 'bcryptjs'; function hashPassword(password){ const salt = bcrypt.genSaltSync(); return bcrypt.hashSync(password, salt); } function comparePassword(raw, hash){ return bcrypt.compareSync(raw, hash) } // here above in compare password function first argument is raw pass means plain pass which you have entered and second hash is that already saved hashed password , we will compare it and get user login export {hashPassword, comparePassword } // End Helper ====================================================== // now at your IndexModel or User Model import that functions which were created in helper.js as well RegisterSchema also import RegisterSchemaModel from '../schema/RegisterSchema.js'; import {hashPassword, comparePassword} from '../schema/helper.js'; class IndexModel{...