lagiacrus
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

lagiacrus

npm version

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);

Readme

Keywords

none

Package Sidebar

Install

npm i lagiacrus

Weekly Downloads

1

Version

1.1.4

License

BSD-3-Clause

Unpacked Size

98.6 kB

Total Files

57

Last publish

Collaborators

  • bbriatte