Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/alosaur/alosaur

Alosaur - Deno web framework with many ES Decorators
https://github.com/alosaur/alosaur

decorators deno middleware mvc

Last synced: about 2 months ago
JSON representation

Alosaur - Deno web framework with many ES Decorators

Lists

README

        

# Alosaur 🦖

Alosaur - [Deno](https://github.com/denoland) web framework 🦖.

[Documentation](https://alosaur.com/)

[![test](https://github.com/alosaur/alosaur/actions/workflows/ci.yml/badge.svg)](https://github.com/alosaur/alosaur/actions/workflows/ci.yml)
![sponsors](https://opencollective.com/alosaur/sponsors/badge.svg)

- **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** - ES decorators for query, cookie, parametrs, routes and etc.
- **Dependency Injection** - for all controllers and hooks by default.
- **Security** - supports security context (Session, Authentication, Authorization, OAuth, Google and custom strategy)
[Security](https://github.com/alosaur/alosaur/tree/master/src/security)
- **Render pages** any template render engine. [(more)](https://github.com/alosaur/alosaur#render-pages)

[中文说明](https://github.com/alosaur/alosaur/blob/master/README_zh.md)

How do I use Alosaur in Deno Deploy? Use the light version of Alosaur:
[Alosaur Lite](https://github.com/alosaur/alosaur-lite)

---

## Simple example

app.ts:

```typescript
import { App, Area, Controller, Get } from "https://deno.land/x/alosaur/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](https://github.com/alosaur/alosaur/tree/master/examples/)

## Sponsors

### Backers