svrjs-nextjs-website/hashedpass.js

13 lines
400 B
JavaScript
Raw Normal View History

2024-07-30 21:17:07 +02:00
const bcrypt = require("bcrypt");
// run node `.\hashedpass.js`
// Replace this with your password and then replace that in .env file
const password = "thisisrandomahhpassword";
const saltRounds = 10;
bcrypt.hash(password, saltRounds, function (error, hash) {
if (error) throw error;
// copy the hash and put it the value for ADMIN_PASSWORD in .env
console.log("Hashed Password:", hash);
});