Greetings to Deno / TypeScript / JavaScript community!
Today I'd love to introduce a DevTool: as your HTTP middleware library
Then oak-routing-ctrl might be worth a try.
Here is what's in the box:
1. TypeScript Decorators
First we have a set of TypeScript Decorators (conforming to , and glue it up with the API route handler function we wrote above. Of course it can be in the same file, or a different file, up to your flavour. Here we use a different file:
// main.ts
import { Application } from "@oak/[email protected]";
import { useOakServer } from "@dklab/[email protected]";
import { MyController } from "./MyController.ts";
const app = new Application();
useOakServer(app, [MyController]);
await app.listen({ port: 1993 });
The example code so far assumes we're on Deno runtime. But heads up: both oak and oak-routing-ctrl .
Looking forward...
Up to this point, you may wonder what's so special about this library. I, as the author, am of course biased, but if you must know: nope, it's indeed "just another DevTool". I'm not taking pride in its superb performance or any underlying rocket science, I do appreciate the level of care and seriousness I myself put in while developing it. Before it reaches the "relatively stable" version of 0.7.4 (at which time I write this blog post), it went through a valley of alpha releases:
or even fork their own development directions.
What I commit to is the continuous maintenance of this library. It is used on production for my own and my employer's web-scale products, thereby giving me "unfair incentives" to keep it sane & performant.
If you use it for your work, I would really love to hear your thoughts and suggestions, i.e. what you like, what you don't like. A GitHub Star, or a constructive feedback issue, to me is equally valuable.
If I still have you on this line, it means my English skill is not any more rusty than my coding skill ;) and it means the world to me (😀). If you feel I missed something, or said something contrary to your knowledge, please feel free to place your questions in the comment section down below. Discussing tech topics is the best way for everyone to learn!
Thank you for your time on this blog post. Have a blast in what you're doing, wherever you are 🍻
SOCIAL SHARE CARD GENERATOR