This is a test project to see how async JavaScript works, between bun and node.
Bun can complete the /not-blocking
endpoint without getting timed out, but it seems the async task is not working as expected. /ping
endpoint is not returning data.
Meanwhile Node always timed out, but when hitting /not-blocking
, /ping
can still return data, async task is working as expected.
To install dependencies:
bun install // Bun
yarn install // Node-Yarn
npm install // Node-NPM
To run:
bun start:bun // Bun
yarn start:node // Node-Yarn
npm run start:node // Node-NPM
bun-debug run start:bun-debug // bun-debug
Note:
- to run with bun-debug, please follow this guide to setup Bun Development
This project was created using bun init
in bun v0.6.9. Bun is a fast all-in-one JavaScript runtime.