AI Workshop: learn to build apps with AI →
Bun: Running your first Bun program

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


Bun runs JavaScript/TypeScript server-side.

Let’s create the simplest program in an empty folder. Create a hello.js file:

console.log('hello')

Run it using

bun hello.js

This is like running node hello.js, but using Bun’s JavaScript runtime instead of Node.js.

Rename hello.js to hello.ts to make it a TypeScript file, and run it using bun hello.ts.

It works in the same way. This is because of Bun’s built-in TypeScript support.

Lessons in this unit:

0: Introduction
1: Installing Bun
2: ▶︎ Running your first Bun program
3: Working with packages
4: Bun's built-in features