Calio/scripts/password.js
Elijah 6fc0a01c56
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
first commit
2026-10-20 19:04:12 -07:00

10 lines
385 B
JavaScript

import { hashPassword } from "../server/auth.js";
// Read from stdin so passwords never need to appear in shell arguments.
let input = "";
for await (const chunk of process.stdin) input += chunk;
const password = input.trimEnd();
if (password.length < 12)
throw new Error(
"Use at least 12 characters. Pipe the password through stdin.",
);
console.log(hashPassword(password));