first commit

This commit is contained in:
Johan LEROY
2026-04-21 14:14:03 +02:00
commit 7c7ff160eb
125 changed files with 13379 additions and 0 deletions

16
scripts/hash-password.mjs Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env node
import bcrypt from 'bcryptjs';
import { randomBytes } from 'node:crypto';
const password = process.argv[2];
if (!password) {
console.error('Usage: npm run hash:password -- <mot_de_passe>');
process.exit(1);
}
const hash = bcrypt.hashSync(password, 12);
const jwtSecret = randomBytes(48).toString('base64');
console.log('\n✅ Copier ce bloc dans ton .env ou variables Plesk :\n');
console.log(`ADMIN_PASSWORD_HASH=${hash}`);
console.log(`ADMIN_JWT_SECRET=${jwtSecret}\n`);