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: 26 days ago
JSON representation
Alosaur - Deno web framework with many ES Decorators
- Host: GitHub
- URL: https://github.com/alosaur/alosaur
- Owner: alosaur
- License: mit
- Created: 2019-03-29T10:32:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-23T17:27:40.000Z (8 months ago)
- Last Synced: 2024-04-14T02:35:25.482Z (7 months ago)
- Topics: decorators, deno, middleware, mvc
- Language: TypeScript
- Homepage: https://alosaur.com
- Size: 952 KB
- Stars: 809
- Watchers: 24
- Forks: 47
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: security.ts
Awesome Lists containing this project
- awesome-deno - alosaur - Alosaur-具有许多装饰器的Deno Web框架。 (Uncategorized / Uncategorized)
- awesome-deno - alosaur - Alosaur - Deno web framework with many decorators. ![GitHub stars](https://img.shields.io/github/stars/alosaur/alosaur?style=plastic&logoWidth=1) (Modules / Online Playgrounds)
- awesome-deno - alosaur - Alosaur - Deno web framework with many ES Decorators. (Modules / Web framework)
- awesome-deno-cn - @alosaur/alosaur
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