svrjs-nextjs-website/hashedpass.js
2024-07-31 00:47:07 +05:30

12 lines
400 B
JavaScript

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);
});