A better Deno framework to create web application.
Branch: master
Clone or download

README.md

Abc

A better Deno framework to create web application

DenoLib Build Status

Hello World

import { abc } from "https://deno.land/x/abc/mod.ts";

const app = abc();

app
  .get("/hello", c => {
    return "Hello, Abc!";
  })
  .start("0.0.0.0:8080");

Routing

app
  .get("/", findAll)
  .get("/:id", findOne)
  .post("/", create)
  .delete("/users/:id", deleteUser);

Path Parameters

// app.get("/users/:id", getUser)
function getUser(c: Context) {
  // User ID from path `users/:id`
  const { id } = c.param;
  return id;
}

Browse to http://localhost:8080/users/zhmushan and you should see "zhmushan" on the page.

Static Content

Serve any file from static directory.

app.static("/static/*files");

Middleware

coming soon...

Official Middleware

Tutorial