const bcrypt = require('bcryptjs'); // npm i bcryptjs
const password = "12345"
let salt = bcrypt.genSaltSync(10);
let hash = bcrypt.hashSync(password, salt);
// check hash password
// bcrypt.compareSync(password, hashPassword);
//hash password
const hashedPassword = bcrypt.hashSync(yourPasswordFromSignupForm, bcrypt.genSaltSync());
//verify password
const doesPasswordMatch = bcrypt.compareSync(yourPasswordFromLoginForm, yourHashedPassword)