feat: ditch triplit, move to postgresql + drizzle orm
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { drizzle } from 'drizzle-orm/node-postgres';
|
||||
import { relations } from '../../drizzle/relations';
|
||||
|
||||
import { Pool } from "pg";
|
||||
|
||||
const pool = new Pool({
|
||||
connectionString: process.env.DATABASE_URL || 'postgres://postgres:password@localhost:5432/veridian',
|
||||
});
|
||||
|
||||
export const db = drizzle(
|
||||
{ client: pool, relations }
|
||||
);
|
||||
@@ -1,8 +0,0 @@
|
||||
import { HttpClient } from '@triplit/client';
|
||||
import { schema } from '#triplit/schema';
|
||||
|
||||
export const httpClient = new HttpClient({
|
||||
schema,
|
||||
serverUrl: process.env.NUXT_LOCAL_TRIPLIT_URL || process.env.NUXT_PUBLIC_TRIPLIT_URL,
|
||||
token: process.env.TRIPLIT_SERVICE_TOKEN,
|
||||
});
|
||||
Reference in New Issue
Block a user