Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/anitaxu888_anitaxu888.github.io.json

1 line
1.6 KiB
JSON

{"repo": "anitaxu888/anitaxu888.github.io", "files": {"backend-node/README.md": {"5bd4c6e672f4a3e68102f35ec258b57083c22203": {"t": 1785809887.8528888, "n": 1343, "h": "6b52d45386f3090c", "c": "# AI Match Proxy (Node)\n\nThis service is the backend proxy for your portfolio AI matcher.\nFrontend calls `/api/ai-match`, and this server forwards requests to Tencent LKEAP.\n\n## 1) Local run\n\n```bash\ncd backend-node\nnpm install\ncp .env.example .env\n```\n\nEdit `.env`:\n\n```env\nPORT=3000\nUPSTREAM_API_KEY=your_new_tencent_key\nUPSTREAM_API_ENDPOINT=https://api.lkeap.cloud.tencent.com\nUPSTREAM_AUTH_SCHEME=Bearer\nDEFAULT_MODEL=deepseek-v3\nALLOWED_ORIGINS=\n```\n\nStart:\n\n```bash\nnpm start\n```\n\nHealth check:\n\n```bash\nGET http://localhost:3000/health\n```\n\n## 2) Frontend endpoint\n\nYour `index.html` already defaults to:\n\n- local: `http://localhost:3000/api/ai-match`\n- production: `https://YOUR_BACKEND_DOMAIN/api/ai-match`\n\nReplace `YOUR_BACKEND_DOMAIN` with your deployed backend domain.\n\n## 3) Deploy on Render\n\n1. Create a new Web Service, root directory: `backend-node`\n2. Build Command: `npm install`\n3. Start Command: `npm start`\n4. Add environment variables:\n - `UPSTREAM_API_KEY`\n - `UPSTREAM_API_ENDPOINT` (can be just `https://api.lkeap.cloud.tencent.com`)\n - `UPSTREAM_AUTH_SCHEME` (`Bearer`)\n - `DEFAULT_MODEL` (your available model)\n - `ALLOWED_ORIGINS` (your GitHub Pages domain)\n\n## 4) Security notes\n\n- Never expose `UPSTREAM_API_KEY` in frontend.\n- If an old key was leaked, revoke it immediately and rotate to a new one.\n"}}}}