3.4.7 • Published 10 months ago

@otterhttp/app v3.4.7

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
10 months ago

@otterhttp/app

The core of tinyhttp. Contains the App, Request and Response. Additionally, it provides special tinyhttp-specific types.

Install

pnpm i @otterhttp/app

Example

import { App } from '@otterhttp/app'
import type { Request, Response, NextFunction } from '@otterhttp/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)
3.4.7

10 months ago

3.4.6

10 months ago

3.4.5

10 months ago

3.4.4

1 year ago

3.4.3

1 year ago

3.4.2

1 year ago

3.4.1

1 year ago

3.4.0

1 year ago

3.3.0

1 year ago

3.2.0

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago