A RESTful API built with Hono and TypeScript, connected to MongoDB, and running on Bun.sh. This project demonstrates the implementation of CRUD operations, validation, and testing using modern web technologies.
- CRUD Operations: Create, Read, Update, Delete operations for resources.
- Validation: Input validation using
class-validator
and Hono's built-in validator. - Testing: Comprehensive testing setup with Jest.
- Environment Configuration: Manage configuration using environment variables.
- Modern Technologies: Built with Hono, TypeScript, MongoDB, and Bun.sh.
- Clone the repository:
git clone https://github.com/Vitaee/HonoStarter.git
- Navigate to the project directory:
cd HonoStarter
- Install dependencies:
bun install
- Set up environment variables:
Create a
.env
file in the root directory and add your MongoDB connection details:DB_USER=your_db_user DB_PASS=your_db_password DB_HOST=your_db_host DB_PORT=your_db_port DB_DATABASE=your_db_name PORT=3000
To start the application in development mode:
bun run dev
To run tests:
bun run test
The API will be available at http://localhost:3000. You can access various endpoints like /users to perform CRUD operations.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.