@purista/hono-http-server v2.0.5
PURISTA API / @purista/hono-http-server
@purista/hono-http-server
Package for using a Hono as webserver.
Minimal example:
Example
typescript
import { serve } from '@hono/node-server'
import { DefaultEventBridge } from '@purista/core'
import { honoV1Service } from '@purista/hono-http-server'
// create and init our eventbridge
const eventBridge = new DefaultEventBridge()
await eventBridge.start()
// add your service
const pingService = await pingV1Service.getInstance(eventBridge)
await pingService.start()
const honoService = await honoV1Service.getInstance(eventBridge, {
serviceConfig: {
services: [pingService]
}
})
await honoService.start()
const _serverInstance = serve({
fetch: honoService.app.fetch,
port: 3000,
})
Enumerations
Type Aliases
- BindingsBase
- EndpointProtectMiddleware
- HealthFunction
- HonoServiceV1Config
- HonoServiceV1ConfigPartial
- VariablesBase
Variables
- DEFAULT_API_MOUNT_PATH
- ExternalDocumentationObjectSchema
- honoServiceV1ConfigSchema
- honoV1Service
- InfoObjectSchema
- OPENAPI_DEFAULT_INFO
- puristaVersion
- ServerObjectSchema
- TagObjectSchema