From 456078fa5b8a4546fc92c05d2a52d13aa301aa8a Mon Sep 17 00:00:00 2001
From: Yusuke Wada <yusuke@kamawada.com>
Date: Wed, 28 Aug 2024 22:27:15 +0900
Subject: [PATCH] docs(dev-server): update README (#169)

---
 packages/dev-server/README.md | 36 +++++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/packages/dev-server/README.md b/packages/dev-server/README.md
index 38463b0..207d649 100644
--- a/packages/dev-server/README.md
+++ b/packages/dev-server/README.md
@@ -51,13 +51,13 @@ So, any Hono application will run on `@hono/vite-dev-server`.
 
 You can install `vite` and `@hono/vite-dev-server` via npm.
 
-```text
+```bash
 npm i -D vite @hono/vite-dev-server
 ```
 
 Or you can install them with Bun.
 
-```text
+```bash
 bun add vite @hono/vite-dev-server
 ```
 
@@ -82,13 +82,13 @@ export default defineConfig({
 
 Just run `vite`.
 
-```text
+```bash
 npm exec vite
 ```
 
 Or
 
-```text
+```bash
 bunx --bun vite
 ```
 
@@ -169,7 +169,7 @@ You can pass the Bindings specified in `wrangler.toml` to your application by us
 
 Install miniflare and wrangler to develop and deploy your cf project.
 
-```text
+```bash
 npm i -D wrangler miniflare
 ```
 
@@ -189,6 +189,30 @@ export default defineConfig(async () => {
 })
 ```
 
+### Node.js & Bun
+
+No additional dependencies needed.
+
+```ts
+import devServer from '@hono/vite-dev-server'
+import nodeAdapter from '@hono/vite-dev-server/node'
+// OR
+// import bunAdapter from '@hono/vite-dev-server/bun'
+import { defineConfig } from 'vite'
+
+export default defineConfig(async () => {
+  return {
+    plugins: [
+      devServer({
+        adapter: nodeAdapter,
+        // OR
+        // adapter: bunAdapter,
+      }),
+    ],
+  }
+})
+```
+
 ## Client-side
 
 You can write client-side scripts and import them into your application using Vite's features.
@@ -258,7 +282,7 @@ export default defineConfig(({ mode }) => {
 
 You can run the following command to build the client script.
 
-```text
+```bash
 vite build --mode client
 ```