@hazejs/core
v1.0.0
Published
The hazejs runtime: IoC container, routing, middleware, auth, cache, queues, events, WebSocket, storage and mail on top of h3
Maintainers
Readme
@hazejs/core
The hazejs runtime: application lifecycle, IoC container, routing, middleware, exception handling, validation, auth & authorization, sessions, cache, queues, scheduler, events, WebSocket, file storage and mail — on top of h3 v2.
Install
pnpm add @hazejs/coreUsage
import { createApplication, defineRoutes } from '@hazejs/core'
const app = await createApplication({
routes: [
defineRoutes(r => r.get('/hello', () => ({ message: 'Hello, hazejs!' })))
],
})
app.serve({ port: 3000 })Most projects use it through the haze CLI or the Vite plugin, which discover app/, config/ and route/ automatically. Optional drivers are peer dependencies — install only what you use (ioredis, bullmq, @upstash/redis, nodemailer, @aws-sdk/client-s3, …).
Part of hazejs — see the main README for documentation.
