- db/schema.sql: poets, categories, poems, verses; normalised search_text with pg_trgm index - api/: Fastify + pg, Node native TypeScript (no build step) - import.ts: loads divan-data (folder or CDN) with upserts; full import in ~36 s - server.ts: /api/poets, /api/page?url=, /api/search (Urdu-normalised ILIKE), /health - urdu.ts (+ test): normaliser ported from the .NET version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 lines
161 B
TypeScript
6 lines
161 B
TypeScript
import pg from 'pg';
|
|
|
|
export const pool = new pg.Pool({
|
|
connectionString: process.env.DATABASE_URL ?? 'postgres://divan:divan_local@localhost:5433/divan',
|
|
});
|