added doga

This commit is contained in:
szabomarton
2025-02-25 09:55:29 +01:00
parent 5174ab4cc4
commit 13254e5623
1149 changed files with 80161 additions and 0 deletions

25
25_02_24/node_modules/@tinyhttp/app/README.md generated vendored Normal file
View File

@@ -0,0 +1,25 @@
# @tinyhttp/app
The core of tinyhttp. Contains the `App`, `Request` and `Response`. Additionally, it provides special tinyhttp-specific types.
## Install
```sh
pnpm i @tinyhttp/app
```
## Example
```ts
import { App } from '@tinyhttp/app'
import type { Request, Response, NextFunction } from '@tinyhttp/app'
new App()
.use((req: Request, res: Response, next: NextFunction) => {
console.log('Did a request')
next()
})
.get('/', (_, res) => res.send('<h1>Hello World</h1>'))
.get('/page/:page', (req, res) => res.send(`You opened ${req.params.page}`))
.listen(3000)
```