Skip to content

Setting up Hello World API

To create a simple Hello World API using Hono.js, follow these steps:

Run the following command to create a new Hono project

Terminal window
bun create hono@latest

When prompted choose the following options:

✔ Target directory: my-app
✔ Which template do you want to use? bun
✔ Do you want to install project dependencies? Yes
✔ Which package manager do you want to use? bun

This will set up a basic Hono.js project with a Hello World API.

  • Directorysrc
    • index.ts API endpoint is hiding here 👀
  • .gitignore
  • README.md
  • bun.lock
  • package.json
  • tsconfig.json
  1. Change directory to your project

    Terminal window
    cd my-app
  2. Start the development server

    Terminal window
    bun run dev

Your app will run at http://localhost:8787.

Open it in your browser, and you will see Hello Hono!