(Feat): Initial Commit
This commit is contained in:
13
backend/scripts/hash-password.js
Normal file
13
backend/scripts/hash-password.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
const password = process.argv[2] || 'admin123';
|
||||
|
||||
bcrypt.hash(password, 10, (err, hash) => {
|
||||
if (err) {
|
||||
console.error('Error hashing password:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Password:', password);
|
||||
console.log('Hash:', hash);
|
||||
console.log('\nUse this hash in the database schema or when creating users.');
|
||||
});
|
||||
Reference in New Issue
Block a user