Skip to content

Commit 89623b7

Browse files
committed
updating docs
1 parent e5891b2 commit 89623b7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Experimental, bun-based HTTP framework inspired by [0http](https://0http.21no.de
88
```js
99
const http = require('0http-bun')
1010

11-
const { router } = http({})
11+
const { router } = http({
12+
port: 3000
13+
})
1214
router.use((req, next) => {
1315
req.ctx = {
1416
engine: 'bun'
@@ -28,10 +30,7 @@ router.delete('/:id', async (req) => {
2830
})
2931
})
3032

31-
module.exports = {
32-
port: 3000,
33-
fetch: (request) => router.lookup(request)
34-
}
33+
export default router
3534
```
3635
# Benchmarks
3736
## 0http-bun (bun v0.2.2)

0 commit comments

Comments
 (0)