Just one of the things I'm learning. https://github.com/hchiam/learning
basically bun replaces a bunch of stuff, and runs faster: https://www.youtube.com/watch?v=M4TufsFlv_o
- https://bun.sh
- https://github.com/oven-sh/bun#quick-links
- https://bun.sh/docs/runtime/hot
- https://bun.sh/docs/runtime/autoimport
- https://bun.sh/docs/cli/test and https://bun.sh/docs/test/writing and https://bun.sh/docs/test/hot and https://bun.sh/docs/test/lifecycle and https://bun.sh/docs/test/mocks#spyon and https://bun.sh/docs/test/snapshots and https://bun.sh/docs/test/dom and https://bun.sh/docs/test/coverage
- https://bun.sh/docs/typescript
- https://bun.sh/docs/runtime/env
- https://bun.sh/docs/runtime/modules
- https://bun.sh/docs/bundler
- https://bun.sh/docs/bundler/loaders
- https://bun.sh/docs/bundler/executables
- https://bun.sh/docs/api/console
- https://bun.sh/docs/api/globals
- https://bun.sh/docs/api/http#tls and https://bun.sh/docs/api/tcp
- https://bun.sh/docs/api/websockets#start-a-websocket-server
- https://bun.sh/docs/api/workers
- https://bun.sh/docs/api/binary-data
- https://bun.sh/docs/api/file-io
- https://bun.sh/docs/api/import-meta for a module to get info about itself
- https://bun.sh/docs/api/sqlite database
bun init # like npm init
bun install # instead of npm installbun run index.ts
bun run --watch index.ts
bun run dev # if you have "dev" set up in "scripts" in package.jsonbun test # will automatically run [...].test.tsx filesbunx cowsay -d 'hi' # instead of npx cowsay -d 'hi'
bunx serve . # to serve index.html
open http://localhost:3000/example; bunx serve .
open http://localhost:3000/example; bun ./example.html
# bunx serve . & open http://localhost:3000/example # to serve example.html instead and run it right away in browser
# kill $(lsof -t -i:3000) # to stop port 3000 from being served