A lightning-fast web application template using Hono.js and Bun runtime, with MongoDB integration and Docker support.
- 🏃♂️ Ultra-fast Performance: Built with Hono.js and Bun runtime
- 🗃️ MongoDB Integration: Ready-to-use MongoDB connection with Mongoose
- 🐳 Docker Support: Complete Docker setup with multi-stage builds
- 🔄 Job Management: Built-in job scheduler with Cron support
- 🛠️ Developer Tools:
- TypeScript configuration
- ESLint + Prettier setup
- Conventional commits with Husky
- GitHub Actions workflow for AWS ECR
- Bun (latest version)
- Docker (optional)
- MongoDB instance
- Clone the repository:
git clone https://github.com/InverterNetwork/hono.git
- Install dependencies:
bun install
- Set up your environment variables:
- Create .env file from example
cp .env.example .env
Start the development server:
bun dev
The server will start at http://localhost:8080
with hot-reload enabled.
Build and start the production server:
bun start
The template includes a convenient Docker management script:
bun docker
This will show you various Docker operations like:
- Building images
- Starting containers
- Managing containers and images
- And more!
├── src/ │ ├── index.ts # Application entry point │ ├── lib/ # Core libraries │ ├── utils/ # Utility functions │ ├── middlewares/ # Middlewares │ ├── services/ # Services │ ├── types/ # Types │ └── jobs/ # Background jobs ├── tools/ # Development tools ├── tests/ # Tests ├── .github/ # GitHub Actions workflows └── docker.sh # Docker management script
The project uses ESLint and Prettier for code quality:
bunx eslint --fix
bunx prettier --write
Husky is configured with:
- Pre-commit: Runs linting and formatting
- Commit-msg: Ensures conventional commit messages
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.