diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b0de84f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,19 @@ +## Cursor Cloud specific instructions + +This is **wt-tracker**, a high-performance WebTorrent tracker (WebRTC signaling server). Single Node.js process, no external services (no DB, no Redis, no Docker). + +### Key commands + +All commands are in `package.json` scripts. Highlights: + +- `npm run lint` — ESLint +- `npx vitest run` — run tests (use `run` to avoid watch mode) +- `npm run build` — lint + clean + compile TypeScript to `lib/` +- `npm start -- [config.json]` — start server (requires build first) + +### Notes + +- The default `npm test` starts Vitest in **watch mode**; use `npx vitest run` for non-interactive CI-style runs. +- To run the server, build first (`npm run build`), then `npm start -- /path/to/config.json`. A sample config is at `sample/config.json` but it includes an HTTPS server requiring SSL certs. For HTTP-only testing, create a config with only the first server entry. +- `/stats.json` endpoint on the running server returns tracker statistics (torrents, peers, memory). +- `uWebSockets.js` is a native C++ addon fetched from GitHub; `npm install` handles it automatically.