Commit 2c7d260
feat: implement api server, refactor benchmark, fix tests
- Installed express, cors, helmet, dotenv.
- Modified `src/index.js` to run the Express API server when the `--server` flag is present, and execute the benchmark logic otherwise.
- Maintained legacy `main()` benchmark logic.
- Fixed the `t.end is not a function` error in `tests/test.js` by removing unsupported `t.end()` calls in the native test runner.
- Added API endpoints `/health` and `/v1/chat/completions` (with mocked output).
- Created `tests/api.test.js` to run supertest queries against the new server structure.
- Updated `package.json` with accurate dependencies, scripts (`npm start`, `npm dev`), and tests.
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>1 parent 44a3b76 commit 2c7d260
6 files changed
Lines changed: 1585 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments