[READ-ONLY] Mirror of https://github.com/thoda-dev/shhh. Self-hostable zero-knowledge pastebin for secrets that expire on their own
docker end-to-end-encryption nuxt nuxtjs pastebin secrets selft-hosted zero-knowledge
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344import { drizzle } from 'drizzle-orm/postgres-js'import postgres from 'postgres'import * as schema from '../database/schema'
if (!process.env.DATABASE_URL) { throw new Error('DATABASE_URL is not set')}
const queryClient = postgres(process.env.DATABASE_URL, { // Silences the migrator's "already exists, skipping" notices, emitted on every boot and easily mistaken for errors. // Warnings and errors are unaffected: they arrive as thrown errors, not notices. onnotice: () => {}})
export const db = drizzle(queryClient, { schema })export { schema }
export { eq, ne, gt, gte, lt, lte, and, or, not, isNull, isNotNull, inArray, notInArray, like, ilike, between, asc, desc, count, sum, avg, max, min, sql} from 'drizzle-orm'