Files
rack-planner/scripts/hashPassword.ts
jason 231de3d005 Initial scaffold: full-stack RackMapper application
Complete project scaffold with working auth, REST API, Prisma/SQLite
schema, Docker config, and React frontend for both Rack Planner and
Service Mapper modules. Both server and client pass TypeScript strict
mode with zero errors. Initial migration applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 21:48:56 -05:00

21 lines
456 B
TypeScript

/**
* Generates a bcrypt hash for use as ADMIN_PASSWORD_HASH env var.
*
* Usage:
* npx tsx scripts/hashPassword.ts yourpassword
*
* Copy the output and paste it into your Docker env var or .env file.
*/
import bcrypt from 'bcryptjs';
const password = process.argv[2];
if (!password) {
console.error('Usage: npx tsx scripts/hashPassword.ts <password>');
process.exit(1);
}
bcrypt.hash(password, 12).then((hash) => {
console.log(hash);
});