ajcwebdev
Video cover art for Bun with Anthony Campolo

Bun with Anthony Campolo

Published:

Anthony Campolo explores Bun, a new JavaScript runtime, demonstrating how to create and deploy basic Bun servers and applications using Railway and discussing its features and ecosystem.

Episode Summary

In this episode, Anthony Campolo introduces Bun, a fast new JavaScript runtime built on Zig. He discusses Bun’s position in relation to Node.js and Deno, highlighting its speed advantages and potential. Anthony demonstrates how to create a simple Bun server and deploy it using Railway, a cloud platform. He also shows how to generate a Next.js app with Bun and discusses the challenges of deploying Bun applications on various platforms. Throughout the stream, Anthony emphasizes the need for better documentation and tutorials for Bun, encouraging the community to contribute blog posts and guides. He also touches on the newly formed company, Oven, built around Bun, and speculates on its future plans for hosting and monetization.

Chapters

00:00 - Introduction and Overview of Bun

Anthony introduces himself and the topic of the stream: Bun, a new JavaScript runtime. He explains what a JavaScript runtime is and compares Bun to Node.js and Deno. Anthony discusses the creation of Bun by Jared Sumner and the recent formation of a company called Oven around the tool. He also mentions the current state of Bun’s documentation and the need for better getting started guides.

05:53 - Setting Up a Bun Server

Anthony demonstrates how to set up a simple Bun server using a repository created by Austin Crim. He clones the repo, examines the server.ts file and Dockerfile, and runs the server locally. Anthony also briefly discusses Boa, a Koa-inspired middleware framework for Bun. This section provides a practical introduction to creating and running a basic Bun application.

27:33 - Deploying Bun on Railway

In this section, Anthony shows how to deploy the Bun server on Railway, a cloud platform. He walks through the steps of initializing a Railway project, linking it to the local repo, and deploying the application. Anthony demonstrates how quickly and easily a Bun application can be deployed using Railway’s Docker support. He also briefly discusses other deployment platforms like Hop.io, showcasing the growing ecosystem around Bun.

33:32 - Creating a Next.js App with Bun

Anthony explores how to generate a Next.js application using Bun. He demonstrates the process of creating a new Next.js project with Bun and running it locally. This section highlights Bun’s compatibility with popular frameworks like Next.js and discusses potential challenges in deploying such applications on platforms like Vercel.

36:55 - Discussion on Bun’s Future and Monetization

In the final section, Anthony speculates on the future of Bun and its parent company, Oven. He discusses potential monetization strategies, including the possibility of Oven offering hosting services similar to Deno Deploy. Anthony encourages viewers to experiment with Bun and contribute to its ecosystem by writing blog posts and tutorials. He concludes by mentioning upcoming guests on his stream and thanking the audience for their participation.