Skip to content

Commit 2c7d260

Browse files
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

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

0 commit comments

Comments
 (0)