This project will allow you to quickly set up backend services in TypeScript. The main point is to use decorators to automatically declare routers and paths.
npm i @smsnm/bookit
yarn add @smsn/bookit
pnpm add @smsn/bookit
import { Router } from '@smsnm/bookit';
@Router()
export default class MainRouter {}
import { Router, Get } from '@smsnm/bookit';
@Router()
export default class MainRouter {
@Get()
hello() {
return '<h1>Hello, BOOKit!</h1>';
}
}
import { Bookit } from '@smsnm/bookit';
import MainRouter from 'path/to/router';
const kit = new Bookit();
kit.addRouters(MainRouter);
kit.start(7910, 'Server started!');
Documentation can be found at: https://samsonium.github.io/bookit/ This is a temporary documentation, which, in the future, will be replaced by the normal 🙃
Contribution guide is under development...
Generated using TypeDoc