Repository
Current version released
4 years ago
Dependencies
deno.land/x
esm.sh
Versions
- 0.1.24Latest
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.30
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- v0.0.17
- v0.0.16
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- v0.0.0
tinyhttp
Deno port of tinyhttp, 0-legacy, tiny & fast web framework as a replacement of Express.
WARNING! This port is very unstable and lacks features. It also doesn’t have all of the tinyhttp’s original extensions.
Example
import { App } from 'https://deno.land/x/tinyhttp@v0.0.3/app.ts'
const app = new App()
app.use('/', (req, next) => {
console.log(`${req.method} ${req.url}`)
next()
})
app.get('/:name/', (req) => {
req.respond({ body: `Hello ${req.params.name}!` })
})
app.listen(3000, () => console.log(`Started on :3000`))
Changes
Because Deno doesn’t have the same API for HTTP server, there’s no res
argument. To send responses use req.respond
instead.