@vp_solutions/express-skeleton-common-module
v1.0.0
Published
Common module for Express Skeleton
Downloads
11
Readme
Common module for @vp_solutions/express-skeleton
Module description
Common Module provide components such a RestController, BaseRouter, ServerTools and etc.
Example of usage with Inversify IoC container:
Common module is ES module that contain interfaces, middlewares and many other things. You can use this module as other npm packages.
// example.router.ts
import { injectable } from 'inversify';
import { BaseRouter, runAsync } from '@vp_solutions/express-skeleton-common-module';
@injectable()
export class ExampleRouter extends BaseRouter {
@postConstruct()
protected defineRoutes(): void {
this.router.get(
'/example',
runAsync(async (req, res, next) => {
// your async logic
}),
);
}
}