mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-28 19:44:23 +01:00
29 lines
619 B
JavaScript
29 lines
619 B
JavaScript
const { PrismaClient } = require('@prisma/client')
|
|
const prisma = new PrismaClient()
|
|
|
|
async function main() {
|
|
const category = await prisma.category.create({
|
|
data: {
|
|
title: 'El Salvador',
|
|
},
|
|
});
|
|
|
|
const project = await prisma.project.create({
|
|
data: {
|
|
title: "Captain Morgan",
|
|
description: "HQ on a VULCANO lake",
|
|
website: "https://github.com/peakshift",
|
|
category_id: category.id,
|
|
lightning_address: "johns@getalby.com",
|
|
}
|
|
});
|
|
}
|
|
|
|
main()
|
|
.catch((e) => {
|
|
console.error(e)
|
|
process.exit(1)
|
|
})
|
|
.finally(async () => {
|
|
await prisma.$disconnect()
|
|
}) |