Skip to content

alosaur/alosaur

master
Switch branches/tags
Code

Latest commit

change(renderer): implement standard renderer for NoContent
bc3691d

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
e2e
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Alosaur 🦖

Alosaur - Deno web framework 🦖.

Documentation

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 (more about alosaur injection).
  • Security - supports security context (Session, Authentication, Authorization, OAuth, Google and custom strategy) Security
  • Render pages any template render engine. (more)

中文说明

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


Features roadmap

  • Microservices (TCP) example
  • 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:

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

@Controller() // or specific path @Controller("/home")
export class HomeController {
  @Get() // or specific path @Get("/hello")
  text() {
    return "Hello world";
  }
}

// Declare module
@Area({
  controllers: [HomeController],
})
export class HomeArea {}

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

app.listen();

And run

deno run --allow-net app.ts

More examples

Sponsors

Backers