honestjs
v0.1.6
Published
HonestJS - a modern web framework built on top of Hono
Maintainers
Readme
🚨 Early Development Warning 🚨
Honest is currently in early development (pre-v1.0.0). Please be aware that:
- The API is not stable and may change frequently
- Breaking changes can occur between minor versions
- Some features might be incomplete or missing
- Documentation may not always be up to date
We recommend not using it in production until v1.0.0 is released.
⚠️ Documentation is not yet complete ⚠️
If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
Features
- 🚀 High Performance - Built on top of the ultra-fast Hono framework
- 📦 Modular Architecture - Organize your code into reusable, feature-focused modules
- 💉 Dependency Injection - Built-in DI container for better code organization and testing
- 🔌 Plugin System - Extend functionality through a flexible plugin system
- 🛣️ Advanced Routing - Support for versioning, prefixes, and nested routes
- 🔒 Built-in Security - Guards, middleware, and error handling out of the box
- 🔄 Request Pipeline - Powerful middleware, guards, pipes, and filters
- 📝 TypeScript-First - Built with TypeScript for excellent type safety and IDE support
Quick Start
Using Honest CLI
The fastest way to create a new Honest application is to use the Honest CLI:
# Install Honest CLI globally
bun add -g @honestjs/cli
# Create a new project
honestjs new my-project # alias: honest, hnjs
cd my-project
# Start the development server
bun devThis will create a new project with a standard directory structure and all necessary configuration files.
Manual Setup
If you prefer to set up your project manually, follow these steps:
- Install packages
bun add honestjs hono reflect-metadata
# or
pnpm add honestjs hono reflect-metadata
# or
yarn add honestjs hono reflect-metadata
# or
npm install honestjs hono reflect-metadata- Create your first controller:
// app.controller.ts
import { Controller, Get } from 'honestjs'
@Controller()
class AppController {
@Get()
helloWorld() {
return 'Hello, World!'
}
}
export default AppController- Create a module:
// app.module.ts
import { Module } from 'honestjs'
import { AppController } from './app.controller.ts'
@Module({
controllers: [AppController]
})
class AppModule {}
export default AppModule- Bootstrap your application:
import 'reflect-metadata'
import { Application } from 'honestjs'
import { AppModule } from './app.module'
const { app, hono } = await Application.create(AppModule, {
routing: {
prefix: 'api',
version: 1
}
})
export default honoLicense
MIT © Orkhan Karimov
