Yusuke Wada
c5cc9f25a6
feat: nested route ( #105 )
...
# BREAKING CHANGES!!!
`app.route` is changed:
**Chained route** is obsolete:
```
app.route('/')
.get((c) => c.text('get /'))
// ^^^ Not working now!!
```
Now, `app.route` enables **nested route**:
```
const book = app.route('/book')
book.get('/', (c) => c.text('List books')) // => GET /book
book.get('/:id', (c) => {
return c.text('Get Book: ' + c.req.param('id'))) // => GET /book/:id
})
```
2022-02-16 11:06:22 +09:00
Yusuke Wada
9db4f6f94d
chore: update examples ( #101 )
...
* chore: fixed serve-static example
* chore: update mustache example
* chore: remove unnecessary fields
* chore: update durable objects example
2022-02-12 14:45:29 +09:00
Yusuke Wada
298a3e8724
chore(example): update miniflare version
2022-02-10 20:54:54 +09:00
Yusuke Wada
39ed68b4cc
chore: fix hono-example-blog ( #100 )
2022-02-10 09:59:02 +09:00
Yusuke Wada
24f4a7c5cb
chore: update nano-jsx example ( #97 )
2022-02-08 22:59:58 +09:00
Yusuke Wada
d77d890a73
feat: check response type ( #94 )
...
* feat: check response type
* refactor
* refactor: add types
2022-02-05 23:30:43 +09:00
Yusuke Wada
d5280a1e0a
feat: Basic-auth with polyfill ( #86 )
...
* feat: Basic-auth with polyfill
Basic auth support Fastly Compute@Edge with polyfills
* Try-cache
* Add negative tests
2022-02-03 08:40:20 +09:00
Yusuke Wada
4c213e4379
fix: use atob
for basic auth ( #84 )
...
* fix: use `atob` for basic auth
* Update readme
* fallback
2022-02-02 10:26:48 +09:00
Yusuke Wada
7dd486ad7b
feat: builtin middleware as sub module ( #81 )
...
# BREAKING CHANGES!!
Now, builtin middleware are not in main package. You can't use `Middleware.logger()` method. Call sub modules if needed:
```js
import { Hono } from 'hono'
import { poweredBy } from 'hono/powered-by'
import { logger } from 'hono/logger'
const app = new Hono()
app.use('*', poweredBy())
app.use('*', logger())
```
Closes: #80
---
* feat: builtin middleware as sub module
* fixed middleware
* Update readme
* Add types
* New gif
2022-02-01 22:15:00 +09:00
Yusuke Wada
1841a177fd
example: fix blog example ( #79 )
2022-02-01 06:50:51 +09:00
Yusuke Wada
ffbcb3eeb9
feat: serve static middleware (Cloudflare only) ( #76 )
2022-01-30 17:42:24 +09:00
Yusuke Wada
223429fa71
chore: tweak ( #75 )
...
* Update durable object example
* Add line to mustache readme
* Tweak
* Add comments
2022-01-30 11:33:17 +09:00
Yusuke Wada
29f67c5b72
feat: Mustache Middleware ( #72 )
...
* [WIP] feat: Mustache Middleware
Dirty code.
A Big problem is tests for Workers Site KV does not work well...
* feat: mustache middleware
* Add readme
2022-01-29 09:09:37 +09:00
Yusuke Wada
336afc812d
refactor: refactor something ( #65 )
...
* chmod
* declare `parsedBody` in middleware
* Dont use any
* Rename
* rename and fixed benchmarks, update score
2022-01-26 22:11:11 +09:00