Microraptor
Microraptor is a lightweight framework for easy routing on top of deno network lib. Project is a work-in-progress and in pre-alpha.
Install
Import your Microraptor in your project with just one line of code:
import { Microraptor } from "https://deno.land/x/microraptor/";
How to use (basic)
A basic example of usage is creating a new file named for example web.ts
:
import {
Microraptor,
Method,
MicroraptorRequest,
} from "https://deno.land/x/microraptor/";
const server = new Microraptor({ port: 3000 });
server.route({
method: Method.get,
path: "/",
validation: [],
controller: {
response: (req: MicroraptorRequest) => {
req.request.respond({ body: "Hello Microraptor!" });
},
},
});
server.start();
Then in your terminal you can run:
$ deno run --allow-net web.ts
You can discover a bit more for now in /test
directory.
Todo
[] Middleware [] Cookie [] Querystring [] Validation