Drash
A microframework for Deno focused on resource creation and content negotiation.
// File: app.ts
import Drash from "https://deno.land/x/drash/mod.ts";
// or import Drash from "https://deno.land/x/drash@{version}/mod.ts";
class HomeResource extends Drash.Http.Resource {
static paths = ["/"];
public GET() {
this.response.body = "Hello World!";
return this.response;
}
}
const server = new Drash.Http.Server({
address: "localhost:1337",
response_output: "text/html",
resources: [HomeResource]
});
server.run();
$ deno --allow-net app.ts
Documentation
Full documentation: https://drash.land
Repository: deno-drash-docs
Features
- Content Negotiation
- Static Path Routing
- Regex Path Routing
- Middleware
- Body Handling: application/json
- Body Handling: application/x-www-form-urlencoded
- Body Handling: multipart/form-data
- Handling Path Params
- Handling URL Query Params
Contributing
Contributors are welcomed!