Skip to content

davisuga/unnamed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unnamed web framework

Disclaimer

This is just a RUSHED layer over Deno's native HTTP api.
It has no support for middlewares.
It's obviously not ready for production, but is relatively easy to extend.

Basic usage

import app from "https://deno.land/x/unnamed@0.1.2/mod.ts";

app()
  .onGet({
    "/hello": () => "Hello world",
    "/double/:number": ({ params }) => Number(params?.number) * 2,
  })
  .onPost({
    "/echo": (req) => req.json(),
  })
  //Works with onDelete and onPut too
  .init();