Initial commit

This commit is contained in:
JetSprow
2026-04-29 05:12:39 +10:00
commit 27dbca9cbf
379 changed files with 43486 additions and 0 deletions

31
prisma/seed.ts Normal file
View File

@@ -0,0 +1,31 @@
import "dotenv/config";
import { PrismaClient } from "@prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";
import bcrypt from "bcryptjs";
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
const prisma = new PrismaClient({ adapter });
async function main() {
const hashedPassword = await bcrypt.hash("admin123", 12);
await prisma.user.upsert({
where: { email: "admin@jboard.local" },
update: {},
create: {
email: "admin@jboard.local",
password: hashedPassword,
name: "Admin",
role: "ADMIN",
},
});
console.log("Seed completed: admin@jboard.local / admin123");
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(() => prisma.$disconnect());