tinyhttp-deno
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 ''
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, there's no res
argument. To send responses use req.respond
instead.