Qube117
Qube117
DTDrizzle Team
Created by Qube117 on 5/20/2023 in #help
Incorrect return type findFrist
Whoops totally my fault! I was too hyped, and completely missed that part
5 replies
DTDrizzle Team
Created by Qube117 on 5/20/2023 in #help
Incorrect return type findFrist
This is my db.ts file
import { drizzle } from 'drizzle-orm/planetscale-serverless'
import { connect } from '@planetscale/database'
import { serverEnv } from '$lib/server/serverEnv'

// create the connection
export const connection = connect({
host: serverEnv.DATABASE_HOST,
username: serverEnv.DATABASE_USERNAME,
password: serverEnv.DATABASE_PASSWORD,
})

export const db = drizzle(connection)
import { drizzle } from 'drizzle-orm/planetscale-serverless'
import { connect } from '@planetscale/database'
import { serverEnv } from '$lib/server/serverEnv'

// create the connection
export const connection = connect({
host: serverEnv.DATABASE_HOST,
username: serverEnv.DATABASE_USERNAME,
password: serverEnv.DATABASE_PASSWORD,
})

export const db = drizzle(connection)
and I just import it justing import { db } from '$lib/db/db' (i'm using sveltekit $ is just an allias)
5 replies