This project benchmarks Fastify with OpenAPIGlue, comparing performance between Node.js and Bun runtimes.
-
Install dependencies:
npm install -
Install Bun (if not already installed):
curl -fsSL https://bun.sh/install | bash
-
Run the Node.js benchmark:
npm run benchmark:node -
Run the Bun benchmark:
npm run benchmark:bun -
Compare results:
npm run compare
You can also start the server manually:
-
With Node.js:
npm run start:node -
With Bun:
npm run start:bun
The server will be available at http://localhost:3000 with the following endpoints:
- GET /api/simple
- GET /api/echo/{param}
- POST /api/complex