Skip to content
Deno based http/rest server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Docu
src
staticTesting
.gitignore
DEV.md
LICENSE
README.md
install.ps1
mod.ts
tsconfig.json

README.md

Fari.js

A deno HTTP server, implemented in TypeScript.

Status

Not Production Ready

TO DO (Sorted by prio)

  • Mini, Minimal http features
  • handling Routes
    • static routes
    • dynamic routes
  • Minimal Feature list http/1.1
    • RFC 7230: Message syntax and routing
    • RFC 7231: Semantics and Content
    • RFC 7232: Conditional Requests
    • RFC 7233: Range Requests
    • RFC 7234: Caching
    • RFC 7235: Authentication
  • Minimal Feature list http/2
  • Non Minimal Features http/1.1
  • Non Minimal Features http/2
  • tests, tests, tests
    • Load tests

Static Route serving

import Fari, { HttpCode, FariStatic } from "../mod.ts";

(() => {
    const app = new Fari(`0.0.0.0:8080`)
    app.use("/", new FariStatic("folder name"));

    app.get("/bla", [
        (req, res, next) => {
            console.log("1");
            next();
        },
        (req, res, next) => {
            console.log("2");
            next();
        },
        (req, res) => {
            res.status = HttpCode.OK;
            res.send("Chained");
        }
    ]);

    app.listen(listenOn);
})();
You can’t perform that action at this time.