teamx.min-js
v1.0.0
Published
1. Install deps ```bash npm i ```
Readme
Express + Supabase Server (CRUD + Realtime Status)
Setup
- Install deps
npm i- Create
.env
cp .env.example .env
# fill SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY- Run
npm run devEndpoints
GET /healthGET /status/summaryGET /realtime/status(SSE stream)
Generic CRUD (allowed tables only)
GET /api/:tableGET /api/:table/:idPOST /api/:table(insert or upsert depending on table)PATCH /api/:table/:idDELETE /api/:table/:id
If you set API_KEY in .env, include header: x-api-key: <API_KEY>.
Heartbeats
POST /status/heartbeat/botPOST /status/heartbeat/item
SSE demo (optional)
Inside this repo:
npm i -D eventsource
node client-sse-example.js