Add BMAD framework, authentication, and new features
This commit is contained in:
22
keep-notes/scripts/seed-user.ts
Normal file
22
keep-notes/scripts/seed-user.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import bcrypt from 'bcryptjs'
|
||||
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
async function main() {
|
||||
const hashedPassword = await bcrypt.hash('password123', 10)
|
||||
const user = await prisma.user.upsert({
|
||||
where: { email: 'test@example.com' },
|
||||
update: {},
|
||||
create: {
|
||||
email: 'test@example.com',
|
||||
name: 'Test User',
|
||||
password: hashedPassword,
|
||||
},
|
||||
})
|
||||
console.log('User created:', user)
|
||||
}
|
||||
|
||||
main()
|
||||
.catch(e => console.error(e))
|
||||
.finally(async () => await prisma.$disconnect())
|
||||
Reference in New Issue
Block a user