mirror of
https://gitea.gofwd.group/sean/gunbuilder-next-tailwind.git
synced 2025-12-06 02:56:45 -05:00
12 lines
280 B
JavaScript
12 lines
280 B
JavaScript
|
|
const bcrypt = require('bcryptjs');
|
||
|
|
|
||
|
|
const password = process.argv[2];
|
||
|
|
if (!password) {
|
||
|
|
console.error('Usage: node hash-password.js <password>');
|
||
|
|
process.exit(1);
|
||
|
|
}
|
||
|
|
|
||
|
|
bcrypt.hash(password, 10, (err, hash) => {
|
||
|
|
if (err) throw err;
|
||
|
|
console.log('Hashed password:', hash);
|
||
|
|
});
|