@vode-app/create-hono-server (0.1.0-pre.29)
Installation
@vode-app:registry=npm install @vode-app/create-hono-server@0.1.0-pre.29"@vode-app/create-hono-server": "0.1.0-pre.29"About this package
Introduction
<INTRO TEXT>
Table of Contents
Quick Start
# placeholder:
# <NEW_PACKAGE: <NEW_PACKAGE>
# <TEMPLATE_PACKAGE_NAME: @vode-app/create-hono-server
# <TEMPLATE_NAME: @vode-app/hono-server
mkdir -p <NEW_PACKAGE>
cd <NEW_PACKAGE>
# print the latest version
bun info "@vode-app/create-hono-server" version
# create/update a package from the template in the current directory
bun create --no-install --no-git "@vode-app/hono-server@latest" .
# set metadata in package.json
bun install
Documentation
The following sections explain the configurations and conventions baked into the generated package. Useful when adapting it to fit specific needs.
<DOCUMENTATION>
In the src/main.ts file, an App Host is first created, then an App Host Server is started with the created App Host.
An App Host is just a Hono<E> instance. Do with it what you will.
createAppHost()
// ...
const openApiOptions = {
title: 'Example Vode App Server Web API',
version: '1.0.0',
description: 'Web API for the example Vode App server.',
path: 'openapi',
uiPath: 'scalar',
};
const createAppHostOptions: CreateAppHostOptions<AppHostEnv> = {
middleware: [
createLoggingMiddleware({
logLevel: env.LOG_LEVEL,
logLevelPerScope: Object.keys(logLevelPerScope).length
? logLevelPerScope
: undefined
,
}),
// DEVEL: add dependency injection middlewares here
requestId(),
createRequestLoggerMiddleware(),
compress(),
secureHeaders(),
// DEVEL: add middlewares here
],
endpointGroups: [
createGetHealthEndpoint({
path: '/health',
description: 'App host health check endpoint.',
}),
createGetBuildinfoEndpoint({
path: '/buildinfo',
description: 'App host buildinfo endpoint.',
buildinfoUrl: serverBuildinfoUrl,
}),
// DEVEL: add endpoint groups here
],
exposeOpenApi: env.EXPOSE_OPENAPI,
openApi: openApiOptions,
};
if (basePathTrimmed) createAppHostOptions.basePath = basePathTrimmed;
if (createAppHostOptions.exposeOpenApi && options.openApi) createAppHostOptions.openApi = openApiOptions;
appHost = createAppHost<AppHostEnv>(createAppHostOptions);
// ...
createSpaHost()
// ...
const createSpaOptions: CreateSpaOptions = {
path: 'example/',
buildinfoUrl: clientBuildinfoUrl,
indexHtmlUrl: indexHtmlUrl,
assets: {
'index.bundle.js': new URL('index.bundle.js', distUrl),
'index.bundle.css': new URL('index.bundle.css', distUrl),
'favicon.svg': new URL('favicon.svg', assetsUrl),
'pwa/manifest.webmanifest': new URL('pwa/manifest.webmanifest', assetsUrl),
'pwa/images/wide-screenshot.png': new URL('pwa/images/wide-screenshot.png', assetsUrl),
'pwa/images/mobile-screenshot.png': new URL('pwa/images/mobile-screenshot.png', assetsUrl),
},
};
if (basePathTrimmed) createSpaOptions.basePath = `/${basePathTrimmed}/`;
const openApiOptions = {
title: 'Example Vode App Server Web API',
version: '1.0.0',
description: 'Web API for the example Vode App server.',
path: 'openapi',
uiPath: 'scalar',
};
const createSpaHostOptions: CreateSpaHostOptions<AppHostEnv> = {
basePath: basePathTrimmed,
logLevel: {
default: env.LOG_LEVEL,
perScope: logLevelPerScope,
},
serverBuildinfoUrl,
spa: createSpaOptions,
endpointGroups: [
// DEVEL: add endpoint groups here
],
exposeOpenApi: env.EXPOSE_OPENAPI,
openApi: openApiOptions,
};
appHost = createSpaHost<AppHostEnv>(createSpaHostOptions);
// ...
DevOps
bun update
bun install
bun run clean
bun run build
bun run tests
bun run dist/cli.bundle.js -- example/
# see publish section for publish instructions
Change Management
- Create a new branch for the change.
- Make the changes and commit.
- Bump the version in
package.json. - Add an entry for the new version in
CHANGELOG.md. - Pull request the branch.
- Ensure package artifacts are current.
- Publish.
Publish
Publish to a custom registry.
# placeholder:
# <SCOPE_WITHOUT_AT: vode-app
# <REGISTRY_URL: https://git.chimps.quest/api/packages/vode-app/npm/
# <BUN_PUBLISH_AUTH_TOKEN: <BUN_PUBLISH_AUTH_TOKEN>
~/.bunfig.toml or bunfig.toml:
[install.scopes]
"vode-app" = { url = "https://git.chimps.quest/api/packages/vode-app/npm/", token = "$BUN_PUBLISH_AUTH_TOKEN" }
# authenticate
$env:BUN_PUBLISH_AUTH_TOKEN = "<BUN_PUBLISH_AUTH_TOKEN>"
# publish
bun publish
TLS
# placeholder:
# <TLS_HOST_NAME: <TLS_HOST_NAME>
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -keyout key.pem -out cert.pem -days 7 -subj "/CN=<TLS_HOST_NAME>"
Dependencies
Development dependencies
| ID | Version |
|---|---|
| @types/node | latest |
| esbuild | latest |
| typescript | ^6.0.3 |
Keywords
typescript
template
server
hono
Details
Assets (1)
Versions (42)
View all
0.1.0-pre.59
2026-07-05
0.1.0-pre.58
2026-07-05
0.1.0-pre.57
2026-07-05
0.1.0-pre.56
2026-07-05
0.1.0-pre.55
2026-07-05