Adds new user, playlist, and favorites management API endpoints and React components. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 50814a1e-92e4-4968-856f-7bc7eedf5e8f Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/50814a1e-92e4-4968-856f-7bc7eedf5e8f/hISDNbZ
16 lines
483 B
TypeScript
16 lines
483 B
TypeScript
import { Pool, neonConfig } from '@neondatabase/serverless';
|
|
import { drizzle } from 'drizzle-orm/neon-serverless';
|
|
import ws from "ws";
|
|
import * as schema from "@shared/schema";
|
|
|
|
neonConfig.webSocketConstructor = ws;
|
|
|
|
if (!process.env.DATABASE_URL) {
|
|
throw new Error(
|
|
"DATABASE_URL must be set. Did you forget to provision a database?",
|
|
);
|
|
}
|
|
|
|
export const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
|
export const db = drizzle({ client: pool, schema });
|