feat: add comftui plugin, initial db

This commit is contained in:
BennyKok
2023-12-09 00:10:59 +08:00
parent d6ac12a7ef
commit 6b431426ff
72 changed files with 4602 additions and 250 deletions
+22
View File
@@ -0,0 +1,22 @@
import * as schema from "./schema";
import { neonConfig, Pool } from "@neondatabase/serverless";
import { drizzle as neonDrizzle } from "drizzle-orm/neon-serverless";
// if we're running locally
if (process.env.VERCEL_ENV !== "production") {
// Set the WebSocket proxy to work with the local instance
neonConfig.wsProxy = (host) => `${host}:5481/v1`;
// Disable all authentication and encryption
neonConfig.useSecureWebSocket = false;
neonConfig.pipelineTLS = false;
neonConfig.pipelineConnect = false;
}
export const db = neonDrizzle(
new Pool({
connectionString: process.env.POSTGRES_URL,
}),
{
schema,
}
);