alosaur

alosaur - deno web framework 🦖

Main:

  • Area or Module
  • Controller
  • Middlware - prerequest and postrequest.
  • Decorators - for query, cookie, parametrs, routes and etc.
  • Dependency Injection - for all controllers by default from microsoft/TSyringe

Simple example:

Controller:

import { Controller, Content, Get } from 'https://deno.land/x/alosaur/mod.ts'

@Controller('/home')
export class HomeController {
  @Get('/text')
  text() {
    return Content("Hello world");
  }
  @Get('/json')
  json() {
    return Content({"text":"test"});
  }
}

Area:

// Area without route params
@Area({
  controllers: [HomeController]
})
export class HomeArea {
}

Main app:

const app = new App({
  areas: [HomeArea]
});

app.listen();

TODO

  • Add render views: dejs
  • Add return value JSON
  • Add decorators:
    • @Area
    • @QueryParam
    • @Param param from url: /:id
    • @Body
    • @Cookie
    • @Req
    • @Res
    • @Middleware with regex route
    • @EnableCors for actions with custom policy: (example)
    • @Cache Cache to actions {duration: number} number in ms
  • Add middleware
  • Add static middleware (example: app.useStatic)
  • Add CORS middleware
  • Add DI
  • Add std exceptions
  • Add websockets
  • Add validators example class-validator
  • Add microservice connector with wasm
  • Add benchmarks
  • Add docs and more examples ;)

Plugins & modules

  • Add angular template parser
  • Add CLI with schematics (alosaur/cli)
  • Add validator decorators
  • Add porting TypeORM to deno

Examples

  • Add basic example
  • Add di example
  • Add static serve example
  • Add dejs view render example
  • Add example with sql drivers (postgres)
  • Add example with wasm
  • Add basic example in Docker container