carservice: initial commit

This commit is contained in:
Hermes
2026-07-20 21:17:12 +01:00
commit d315323191
69 changed files with 9255 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
const { PrismaClient } = require("@prisma/client");
const bcrypt = require("bcryptjs");
async function main() {
const prisma = new PrismaClient();
const existing = await prisma.user.findUnique({ where: { username: "admin" } });
if (!existing) {
const hash = await bcrypt.hash("password", 10);
await prisma.user.create({
data: { username: "admin", password: hash },
});
console.log("Created default user: admin / password");
} else {
console.log("User already exists");
}
await prisma.$disconnect();
}
main().catch((e) => {
console.error(e);
process.exit(1);
});