main page and group car

This commit is contained in:
2025-04-14 23:32:15 +02:00
parent 3f4cc126ec
commit 62f1689c1a
20 changed files with 684 additions and 145 deletions
+25
View File
@@ -0,0 +1,25 @@
import "dotenv/config";
import { db } from ".";
import { users } from "./schema";
const usersData = Array.from({ length: 10 }, (_, i) => ({
id: `fake-user-${i + 1}`,
name: `User ${i + 1}`,
image: `https://github.com/mr-shortman.png`,
}));
async function seed() {
try {
await db.insert(users).values(usersData);
console.log(`Seeded users (${usersData.length})`);
} catch (e) {
console.log(e);
}
}
(() => {
seed().then(() => {
console.log("Seeding complete");
process.exit(0);
});
})();