3.4.7 • Published 8 months ago

@otterhttp/app v3.4.7

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
8 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

8 months ago

3.4.6

8 months ago

3.4.5

8 months ago

3.4.4

10 months ago

3.4.3

10 months ago

3.4.2

10 months ago

3.4.1

10 months ago

3.4.0

10 months ago

3.3.0

10 months ago

3.2.0

10 months ago

3.1.2

10 months ago

3.1.1

10 months ago

3.1.0

10 months ago

3.0.2

11 months ago

3.0.1

11 months ago

3.0.0

11 months ago