mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
f5f7146888
- Add Vercel serverless functions for user collections CRUD (collections.js, [id].js, items.js) - Add shared auth (Clerk JWT verification) and Neon DB client helpers - Add @clerk/backend dependency for token verification - Improve dashboard API proxy: handle double-compression, error handling, filter accept-encoding - Add retry logic to collections-api.ts for GET requests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
10 lines
265 B
JavaScript
10 lines
265 B
JavaScript
import { neon } from '@neondatabase/serverless';
|
|
|
|
export function getNeonClient() {
|
|
const connectionString = process.env.NEON_DATABASE_URL;
|
|
if (!connectionString) {
|
|
throw new Error('NEON_DATABASE_URL not configured');
|
|
}
|
|
return neon(connectionString);
|
|
}
|