https://github.com/ryands17/bun-api-starter
Starter API kit with Hono, Bun, and Docker with development and production workflows
https://github.com/ryands17/bun-api-starter
bun docker docker-compose hono
Last synced: 2 months ago
JSON representation
Starter API kit with Hono, Bun, and Docker with development and production workflows
- Host: GitHub
- URL: https://github.com/ryands17/bun-api-starter
- Owner: ryands17
- Created: 2024-03-05T17:32:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T10:48:50.000Z (about 2 years ago)
- Last Synced: 2024-05-18T07:45:44.182Z (about 2 years ago)
- Topics: bun, docker, docker-compose, hono
- Language: TypeScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bun + Hono + Docker
This template provides a minimal setup to get an API working using [Bun](https://bun.sh/) and [Hono](https://hono.dev/getting-started/bun) with Docker and Docker compose for development and production.
## Development workflow
To run the project in dev mode:
```
docker compose watch -d
```
Docker compose automatically watches for changes to files and rebuilds the container if `package.json` changes
```
docker compose logs -f api
```
To install any NPM package
Add the package name and version to `package.json`. Docker will automatically install the package and make sure it's synced to the host
To stop the container
```
docker compose down
```
To check the health of a container. Installing `jq` is recommended
```
docker inspect | jq '.[].State.Health'
```
## Enhancements
- [x] Add an SQLite database with an ORM in front for a full dev experience
- [ ] Run with SQLite in production
- [ ] Replicate the SQLite database in production to an S3 compatible store: [MinIO](https://min.io/docs/minio/container/index.html)