Drash logo

A microframework for Deno based on HTTP resources and content negotiation.


// File: app.ts

import Drash from "https://deno.land/x/drash@v0.10.0/mod.ts";

class HomeResource extends Drash.Http.Resource {
  static paths = ["/"];
  public GET() {
    this.response.body = "Hello World!";
    return this.response;
  }
}

let server = new Drash.Http.Server({
  address: "localhost:1337",
  response_output: "text/html",
  resources: [HomeResource]
});

server.run();
$ deno --allow-net --allow-env app.ts

For a more complicated application, try out the Hello World tutorial series!

Documentation

For full documentation, visit https://drash.io.

Features

  • HTTP Resources
  • Content Negotiation
  • Static Paths
  • Request Path Params (e.g., /users/:id)
  • Request URL Query Params (e.g., /users?id=1234)
  • Request Body (e.g., {"id":"1234"})