Initial Commit
This commit is contained in:
16
src/scripts/hash-password.js
Normal file
16
src/scripts/hash-password.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import bcrypt from 'bcrypt';
|
||||
|
||||
async function hashPassword() {
|
||||
const password = process.argv[2];
|
||||
|
||||
if (!password) {
|
||||
console.error('Usage: bun run src/scripts/hash-password.js <password>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const hash = await bcrypt.hash(password, 12);
|
||||
console.log('Password hash:');
|
||||
console.log(hash);
|
||||
}
|
||||
|
||||
hashPassword();
|
||||
Reference in New Issue
Block a user