Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
skypack.dev
radix3@0.1.2
Versions
httpserv
Tiny and fast http server for Deno
Static route example
const server = listen(PORT, HOSTNAME);
server.expose({
path: "/api",
handler: () => {
return new Response("Hello from Api!");
},
});
Named route example
server.expose({
path: "/id/:id",
method: "POST",
handler: ({ searchString, urlParams }) => {
console.log("searchString: ", searchString);
console.log("urlParams: ", urlParams);
return new Response("Hello from Api!");
},
});
Wildcard route example
server.expose({
path: "/path/**",
handler: ({ searchString, urlParams }) => {
console.log("searchString: ", searchString);
console.log("urlParams: ", urlParams);
return new Response("Hello from Api!");
},
});
Uses Radix3 router.