0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-25 13:19:30 +01:00
Commit Graph

6 Commits

Author SHA1 Message Date
Yusuke Wada
adb55ca052
feat: app.notFound() and app.onError (#117) 2022-02-26 08:36:11 +09:00
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
d77d890a73
feat: check response type (#94)
* feat: check response type

* refactor

* refactor: add types
2022-02-05 23:30:43 +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
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