Fastro
Fast & simple web framework for Deno.
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();
How to use & examples
This module uses the git release. If you want to pick a specific version, for example v0.5.0
, then the full url is https://deno.land/x/fastro@v0.5.0/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
- set custom http headers & status
- create simple REST API
- create
middleware
- create simple jwt auth
- create global & url middleware
- create
decorator
- create
plugin
Benchmarks
If performance is important to you, here are the benchmark results:
Framework | Version | Router? | Avg Req |
---|---|---|---|
Abc | ${abc_version} | ✓ | ${abc} |
Deno http |
${deno_version} | ✗ | ${deno_http} |
Express | ${express_version} | ✓ | ${express} |
Fastify | ${fastify_version} | ✓ | ${fastify} |
Fastro | ${fastro_version} | ✓ | ${fastro} |
Node http |
${node_version} | ✗ | ${node} |
Oak | ${oak_version} | ✓ | ${oak} |
Check this to see the detail method & results: benchmarks.