Popular
Documentations
Application examples
- Basic - CRUD example with 2 areas.
- Cors - enable cors for routes.
- Database - example with repository service on deno postgres driver.
- View render - example with ejs render for deno.
- Dependency Injection - example with
microsoft/TSyringe
. - Static content - serve static files.
Simple example:
import {
Controller,
Content,
Get,
Area,
App,
} from 'https://deno.land/x/alosaur/src/mod.ts'
@Controller('/home')
export class HomeController {
@Get('/text')
text() {
return Content("Hello world");
}
@Get('/json')
json() {
return Content({"text":"test"});
}
}
@Area({
controllers: [HomeController]
})
export class HomeArea {
}
const app = new App({
areas: [HomeArea]
});
app.listen();