tinyhttp icon indicating copy to clipboard operation
tinyhttp copied to clipboard

Deno support

Open v1rtl opened this issue 5 years ago • 1 comments

Now that @tinyhttp/router v1.0.5+ no longer depends on http module of Node.js, it should be very easy to implement basic Deno support for tinyhttp. Probably it would be cool to have it located in the separate deno folder with all editor settings specifically for it.

There aren't strict requirements on how it should be implemented, but i suppose we need to use either raw gh links, jspm or skypack to import the router

and we should use Deno's std http lib to pass request and response as generics, e.g. smth like this:

import { Router } from 'https://...'
import { ServerRequest } from 'https://...'

export class App extends Router<ServerRequest, ...> {
 // ...
}

so it works instantly

v1rtl avatar Dec 10 '20 14:12 v1rtl

I'm happy to announce that I started working on the port of tinyhttp for Deno!

See the repo here: https://github.com/deno-libs/tinyhttp

v1rtl avatar Feb 19 '21 13:02 v1rtl