https://github.com/felixalexk/hono_api_template
A minimal template for building fast, modern REST or RPC APIs using Hono and Bun.
https://github.com/felixalexk/hono_api_template
api bun hono rest rpc template
Last synced: about 1 month ago
JSON representation
A minimal template for building fast, modern REST or RPC APIs using Hono and Bun.
- Host: GitHub
- URL: https://github.com/felixalexk/hono_api_template
- Owner: FelixAlexK
- Created: 2025-05-23T18:28:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-23T18:32:39.000Z (about 1 year ago)
- Last Synced: 2025-05-23T19:28:32.436Z (about 1 year ago)
- Topics: api, bun, hono, rest, rpc, template
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hono_api_template
A minimal template for building fast, modern REST APIs using [Hono](https://hono.dev/) and [Bun](https://bun.sh).
## What is this template for?
This template provides a simple, ready-to-use starting point for developing RESTful APIs with:
- **Hono**: a lightweight, high-performance web framework for JavaScript/TypeScript.
- **Bun**: an all-in-one JavaScript runtime, bundler, and package manager.
It includes:
- Basic project structure with TypeScript support
- Pre-configured ESLint for code quality
- Example logger middleware
- `/api` base path for your endpoints
## How to use
### 1. Install dependencies
```bash
bun install
```
### 2. Start the development server
```bash
bun run dev
```
The server will start on `http://localhost:3000`.
### 3. Add your API routes
Edit `src/app.ts` to add your endpoints under the `/api` base path.
For example:
```ts
app.get("/api/hello", c => c.text("Hello, world!"));
```
### 4. Lint your code
```bash
bun run lint
```
### 5. Format and fix code style issues
```bash
bun run lint:fix
```
---
This project was created using `bun init` in bun v1.2.13.