Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.
gaurishhsPublic archive

About

Plugin for adding decorator and controller-based routing support to Kingworld.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

KingWorld Controllers

  • This plugin adds decorator and controller-based routing support to kingworld.

IMPORTANT! Bun doesn't support decorators yet, so you'll need to upgrade bun by using bun upgrade --canary

Installation

bun add kingworld-controllers

Usage

import { Controller, Get, kwControllers } from 'kingworld-controllers'; 

// /users prefix
@Controller('/users/')
class UsersController {
  @Get()
  index() {
    return 'Hello World';
  }
}

const app = new KingWorld();

app.use(kwControllers, {
  controllers: [UsersController],
});

app.listen(3000);

License

  • This project is licensed under the MIT License - see the LICENSE file for details

About

Plugin for adding decorator and controller-based routing support to Kingworld.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages