A hands-on tutorial demonstrating how to build a serverless API using Bun runtime and Hono web framework. The guide walks through setting up a project, creating API endpoints with CORS middleware, implementing in-memory storage, and building a simple HTML interface to test the API. The tutorial includes a practical example of a sum calculator that receives two numbers, calculates their sum, and stores results. It covers installation, project initialization, route creation (GET and POST endpoints), and running the application locally.
Table of contents
Why Build an API with Bun and Hono?Prerequisites for This TutorialSetting Up Your Bun and Hono ProjectBuilding index.tsBuilding test.htmlHow to Run Your Serverless ApplicationSort: