1.0.7 • Published 6 years ago
@axmit/express-core-helpers v1.0.7
Common information
This package provides amount of helpers for @axmit/express-core
projects.
Prerequisites
Before using this package you need to authorize yourself into npm registry using npm adduser
Installation
npm i @axmit/express-core-helpers
or yarn add @axmit/express-core-helpers
Module
This class will help you to include modules in your application which needed to be initiated and stoped
Usage:
import { Module, AbstractExpressApplication } from '@axmit/express-core-helpers';
export class YourModule extends Module {
public initialize<T extends AbstractExpressApplication>(app: T) {
//initialize your module here
}
public stop<T extends AbstractExpressApplication>(app: T) { //Stop your module here }}
Notice that app
param in the initialize
and stop
method are instance of your ExpressApplication
And it'll run initialize
method before application starts and stop
on application stops