lagiacrus
v1.1.4
Published
Lagiacrus adds decorators to Koa Application
Downloads
16
Readme
lagiacrus
Koa wrapper using decorators
Installation
npm install lagiacrus
Usage
Example
hello.controller.ts
@Controller({
path: '/hello'
})
export class HelloController {
@Get('/')
displayWorld(): string {
return 'world';
}
}
main.ts
async function main(): Promise<http.Server> {
const server = new Server();
server.mount(HelloController);
return await server.start(3000);
}
main().then(() => console.log('Listening...')).catch(console.error);