mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
24 lines
421 B
TypeScript
24 lines
421 B
TypeScript
import { PrismaClient } from '@prisma/client'
|
|
|
|
const prisma = new PrismaClient()
|
|
|
|
async function main() {
|
|
await prisma.hello.create({
|
|
data: {
|
|
text: 'Hello World!',
|
|
},
|
|
})
|
|
}
|
|
|
|
main()
|
|
.then(async () => {
|
|
await prisma.$disconnect()
|
|
return undefined
|
|
})
|
|
.catch(async (e) => {
|
|
// eslint-disable-next-line no-console
|
|
console.error(e)
|
|
await prisma.$disconnect()
|
|
process.exit(1)
|
|
})
|