curl -fsSL https://bun.sh/install | bash
More at https://bun.sh/docs
First, install dependencies with bun install
, then:
bun --watch run bun.ts
OR
bun run bun.ts
To build the React component, run:
bun build react.tsx --outdir ./build
curl -fsSL https://deno.land/x/install/install.sh | sh
Then install and enable the VSCode extension and add settings at .vscode/settings.json
:
{
"deno.config": "./tsconfig.json",
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true
}
More at https://docs.deno.com/runtime/manual
deno run --allow-net --watch deno.ts
OR
deno run --allow-net deno.ts
To build the React component, run:
deno run react.tsx
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
nvm install 21
More at https://github.com/nvm-sh/nvm and https://nodejs.org/en
First, install dependencies with npm install
, then:
node --watch node.js
OR
node node.js
First, install TypeScript with npm install typescript --global
, then to build the React component, run:
tsc react.tsx --esModuleInterop --jsx react --outDir ./build
For comparison, we can also run a Ruby (Rack) server.
curl -sSL https://get.rvm.io | bash -s stable
rvm install 3.2.2
More at https://rvm.io
First, install Rack:
gem install rack
gem install rackup
Then run the server:
rackup
While servers above are running, you can run autocannon benchmarking:
npm run autocannon:bun
npm run autocannon:deno
npm run autocannon:node
npm run autocannon:ruby
Alternatively, you can run loadtest:
npm run loadtest:bun
npm run loadtest:deno
npm run loadtest:node
npm run loadtest:ruby