Alosaur

Alosaur - Deno web framework with many decorators

README

Alosaur 🦖


Alosaur - Deno web framework 🦖.


test
sponsors

- Area - these are the modules of your application.
- Controller - are responsible for controlling the flow of the application execution.
- Middleware - provide a convenient mechanism for filtering HTTP requests entering your application.
- Hooks - middleware for area, controller and actions with support DI. Have 3 life cyclic functions:
  onPreAction, onPostAction, onCatchAction
- Decorators - for query, cookie, parametrs, routes and etc.
- Dependency Injection - for all controllers and hooks by default from microsoft/TSyringe
- Security - supports security context (Session, Authentication, Authorization, OAuth, Google and custom strategy)
- Render pages any template render engine. (more)


How do I use Alosaur in Deno Deploy? Use the light version of Alosaur:


Features roadmap


- [x] Microservices (TCP) example
- [x] Docs website
- [ ] CLI: run applications
- [ ] Create REPL http tool (tool for tests API, WebSockets etc), integrate with Alosaur openapi
- [ ] Background process, BackgroundService, WebJobs, cron


Simple example


app.ts:

  1. ```typescript
  2. import { App, Area, Controller, Get } from "https://deno.land/x/alosaur@v0.36.0/mod.ts";

  3. @Controller() // or specific path @Controller("/home")
  4. export class HomeController {
  5.   @Get() // or specific path @Get("/hello")
  6.   text() {
  7.     return "Hello world";
  8.   }
  9. }

  10. // Declare module
  11. @Area({
  12.   controllers: [HomeController],
  13. })
  14. export class HomeArea {}

  15. // Create alosaur application
  16. const app = new App({
  17.   areas: [HomeArea],
  18. });

  19. app.listen();
  20. ```

And run

deno run --allow-net app.ts


Sponsors



Backers