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";
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
Request
multipart/form-data
Body ParsingExample file (name: apollo.txt):
Apollo wants shrimp.
this.request.getBodyMultipartFormData("apollo")
:{ name: "apollos_file", filename: "apollo.txt", contents: "Apollo wants shrimp.\n", content_disposition: "form-data", content_type: "text/plain", bytes: 21 }
Contributing
Contributors are welcomed!