Skip to content
Myr

chore: update examples (#101)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* chore: fixed serve-static example * chore: update mustache example * chore: remove unnecessary fields * chore: update durable objects example

authored by Yusuke Wada · committed by GitHub · parent 298a3e8 · Browse files · 12 files+46 added−131 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

12 files+46 added−131 removed

  • other:+46 added−131 removed

12 files+46 added−131 removed

modified:examples/durable-objects/package.json+6 added-8 removed
deleted:examples/durable-objects/tsconfig.json-28 removed
deleted:examples/durable-objects/webpack.config.js-30 removed
modified:examples/durable-objects/wrangler.toml+1 added-14 removed
modified:examples/jsx-ssr/package.json-9 removed
added:examples/mustache/src/index.js+16 added
deleted:examples/mustache/index.js-16 removed
modified:examples/mustache/package.json+11 added-2 removed
modified:examples/mustache/wrangler.toml+1 added-8 removed
1name = "hono-example-mustache"2type = "webpack"3route = ''4zone_id = ''5usage_model = ''6compatibility_flags = []7workers_dev = true8compatibility_date = "2022-01-28"2compatibility_date = "2022-02-12"34[site]5bucket = "./view"12entry-point = "."
modified:examples/serve-static/src/index.js+3 added-3 removed
1import { Hono } from '../../../dist'2import { serveStatic } from '../../../src/middleware/serve-static/serve-static'1import { Hono } from 'hono'2import { serveStatic } from 'hono/serve-static'34const hono = new Hono()56hono.use('/static/*', serveStatic({ root: './assets' }))6hono.use('/static/*', serveStatic({ root: './' }))7hono.get('/', (c) => c.text('This is Home! You can access: /static/hello.txt'))89hono.fire()
modified:examples/serve-static/package.json+6 added-4 removed
3 unmodified lines
4 "description": "",5 "main": "src/index.js",6 "scripts": {7 "test": "echo \"Error: no test specified\" && exit 1",8 "dev": "wrangler dev",9 "publish": "wrangler publish"8 "dev": "wrangler dev src/index.js",9 "publish": "wrangler publish src/index.js"10 },11 "author": "Yusuke Wada <yusuke@kamawada.com> (https://github.com/yusukebe)",11 "license": "MIT",12 "dependencies": {14 "hono": "*"13 "hono": "^0.3.7"14 },15 "devDependencies": {16 "wrangler": "^0.0.16"17 }18}
modified:examples/serve-static/wrangler.toml+2 added-9 removed
1name = "hono-example-serve-static"2type = "webpack"3route = ''4zone_id = ''5usage_model = ''6compatibility_flags = []7workers_dev = true8compatibility_date = "2022-01-09"2compatibility_date = "2022-02-12"34[site]11bucket = "./"12entry-point = "./"5bucket = "./assets"