Bun is an all-in-one JavaScript and TypeScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager.
For example, with only a few lines of code, you can get a HTTP server up and running with Bun:
const server = Bun.serve({
port: 3000,
fetch(request) {
return new Response("Welcome to Bun!");
},
});
console.log(`Listening on localhost:${server.port}`);- Install the Bun CLI globally using
npm install -g @bun/bun - Create a new project using
bun new my-project - Change directory to the new project using
cd my-project - Install dependencies using
bun install - Run the project using
bun run - Open the project in your favorite editor and start coding!
- Bun - Bun's official website
- Bun Documentation - Documentation for Bun
This project is released under the terms of The Unlicense, which allows you to use, modify, and distribute the code as you see fit.
- The Unlicense removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the LICENSE file in this repository.
Author: Scott Grivner
Email: scott.grivner@gmail.com
Website: linktr.ee/scottgriv
Reference: Main Branch