Files
fakemoney/server/src/scripts/create-user.ts
2026-07-23 14:28:20 +02:00

12 lines
351 B
TypeScript

import { db, testConnection } from "../util/db";
import { hash } from "bcrypt";
import Account from '../model/user';
(async () =>{
await testConnection();
await Account.create({
id: process.argv[2],
displayName: process.argv[3],
balance: process.argv[4],
password: await hash(process.argv[5], 10),
})
})();