UNPKG

generator-nest-js-boilerplate

Version:

This generator will help you to build your own Nest.js Mongodb API using TypeScript 4

24 lines (21 loc) 463 B
import { PrismaClient } from '@prisma/client'; const prisma = new PrismaClient(); async function main() { await prisma.roleEntity.createMany({ data: [ { name: 'user' }, { name: 'admin' }, ], skipDuplicates: true, }); } main() .then(async () => { await prisma.$disconnect(); }) .catch(async (e) => { // eslint-disable-next-line no-console console.error(e); await prisma.$disconnect(); process.exit(1); });