divan/api/package.json
Anas Rashid c450ec010a Divan v2: Node.js API + PostgreSQL (proof of concept)
- 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>
2026-10-08 20:24:20 +02:00

19 lines
358 B
JSON

{
"name": "divan-api",
"private": true,
"type": "module",
"description": "Divan API: Node.js + PostgreSQL",
"engines": {
"node": ">=24"
},
"scripts": {
"start": "node src/server.ts",
"import": "node src/import.ts",
"test": "node --test src/*.test.ts"
},
"dependencies": {
"fastify": "^5.12.5",
"pg": "^8.23.1"
}
}