Closed arnu515 closed 2 years ago
@satyarohith can you create a new release?
Thanks.
@arnu515, this version uses the official version of media_types and it works.
import { serve } from "https://deno.land/x/sift@0.4.2/mod.ts";
serve({
"/": () => new Response("hello world"),
"/blog/:slug": (request, params) => {
const post = `Hello, you visited ${params.slug}!`;
return new Response(post);
},
// The route handler of 404 will be invoked when a route handler
// for the requested path is not found.
404: () => new Response("not found"),
});
@satyarohith it works now. It didn't work earlier for me, and I had to manually bump the version of media_types by cloning the source code of sift.
Here's the bugged Repl, if you could have a look.
Thanks.
Importing the latest version of
sift
and runningdeno cache
gives this error:The fix would be to bump
media_types
from2.10
to2.11.1
.I've created a pull request for you, so you can just merge it.
Thanks