const bcrypt = require('bcryptjs');

const plainTextPassword = '123';
const saltRounds = 10;

console.log(`Generating a new bcrypt hash for the password: "${plainTextPassword}"`);

bcrypt.hash(plainTextPassword, saltRounds, function(err, hash) {
  if (err) {
    console.error('Error generating hash:', err);
    return;
  }
  
  console.log('\nSUCCESS! Here is your new hash:\n');
  console.log('==============================================================');
  console.log(hash);
  console.log('==============================================================');
  console.log('\nCopy the entire string above (including the $2a$...) and update the password_hash column in your database for the users.');
});