/Knowledge/sources/honojs__hono/llms-full/service-worker-setup--c360936cb529.md
Service Worker: Setup - hono-docs
Service Worker: Setup Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt 1 setup Summary First, create an...
Service Worker: Setup
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#1-setup
Summary
First, create and move to your project directory: sh mkdir my-app cd my-app Create the necessary files for the project. Make a package.json file with the following: ```json { "name": "my-app", "private": true, "scripts": { "dev"...
Content
First, create and move to your project directory:
mkdir my-app
cd my-app
Create the necessary files for the project. Make a package.json file with the following:
{
"name": "my-app",
"private": true,
"scripts": {
"dev": "vite dev"
},
"type": "module"
}
Similarly, create a tsconfig.json file with the following:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"lib": ["ES2020", "DOM", "WebWorker"],
"moduleResolution": "bundler"
},
"include": ["./"],
"exclude": ["node_modules"]
}
Next, install the necessary modules.
::: code-group
npm i hono
npm i -D vite
yarn add hono
yarn add -D vite
pnpm add hono
pnpm add -D vite
bun add hono
bun add -D vite
:::
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#1-setup",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Service Worker > 1. Setup",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 481,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Service Worker: Setup",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}