21 lines
510 B
TypeScript
21 lines
510 B
TypeScript
import { prisma } from "./lib/prisma";
|
|
|
|
async function main() {
|
|
// Fetch all users with their posts
|
|
// const allUsers = await prisma.realEstateArticle.findMany();
|
|
console.log("test");
|
|
const test = await prisma.realEstateArticle.findMany();
|
|
console.log(test);
|
|
// console.log("All users:", JSON.stringify(allUsers, null, 2));
|
|
}
|
|
|
|
main()
|
|
.then(async () => {
|
|
await prisma.$disconnect();
|
|
})
|
|
.catch(async (e) => {
|
|
console.error(e);
|
|
await prisma.$disconnect();
|
|
process.exit(1);
|
|
});
|