Fastro
Deno web framework for developers who are obsessed with performance and simplicity.
Inspired by Fastify & Express.
import { Fastro } from "https://deno.land/x/fastro/mod.ts";
const server = new Fastro();
server.get("/", (req) => req.send("root"));
await server.listen();
Benchmarks
If performance is important to you, here are the benchmark results:
Framework | Version | Router? | Avg Req |
---|---|---|---|
Abc | 1.0.0-rc8 | ✓ | 1144.8 |
Deno http |
1.0.3 | ✗ | 2286.6 |
Express | 4.17.1 | ✓ | 551 |
Fastify | 2.14.1 | ✓ | 1462.7 |
Fastro | 0.5.4 | ✓ | 1766.1 |
Node http |
14.3.0 | ✗ | 2011.3 |
Oak | 4.0.0 | ✓ | 1052.5 |
Check this folder to see the detail method.
How to use & examples
This module uses the git release. If you want to pick a specific version, for example v0.5.4
, then the full url is https://deno.land/x/fastro@v0.5.4/mod.ts
. If you do not use the version, it will refer to master
branch.
Check this folder to find out how to:
- change default port & add optional listen callback
- send simple text & json data
- get url parameters
- get payload from post method
- set custom http headers & status
- change the request object by creating a middleware
- create simple jwt auth
- create global & url middleware
- create decorator to add new property
- create router with plugin
- create simple REST API
- create simple REST API with JWT