2
0

build: add pnpm

This commit is contained in:
Baptiste Arnaud
2022-08-08 08:21:36 +02:00
parent 8c3b5058f1
commit ee338f62dc
183 changed files with 19442 additions and 18364 deletions

View File

@ -1,25 +1,6 @@
import { PrismaClient } from 'db'
import path from 'path'
const prisma = new PrismaClient({
log: [
{
emit: 'event',
level: 'query',
},
{
emit: 'stdout',
level: 'error',
},
{
emit: 'stdout',
level: 'info',
},
{
emit: 'stdout',
level: 'warn',
},
],
})
import fs from 'fs'
require('dotenv').config({
path: path.join(
@ -32,18 +13,6 @@ require('dotenv').config({
),
})
const main = async () => {
prisma.$on('query', (e) => {
console.log('Query: ' + e.query)
console.log('Params: ' + e.params)
console.log('Duration: ' + e.duration + 'ms')
})
const date = new Date()
const lastMonth = new Date(date.getFullYear(), date.getMonth() - 1, 10)
const answers = await prisma.answer.findMany({
where: { createdAt: { lt: lastMonth } },
take: 100,
})
}
const main = async () => {}
main().then()