@swizzyweb/swizzy-web-service
    Preparing search index...

    Class WebService<APP_STATE>Abstract

    Base web service class to be implemented.

    Type Parameters

    • APP_STATE

    Implements

    Index

    Constructors

    Properties

    instanceId: string

    instanceId of WebService.

    logger: ILogger<any>
    name: string

    Friendly name of webservice.

    packageName: string
    path: string
    port: number
    state: APP_STATE

    Methods

    • Returns the current application state shared across routers.

      Returns APP_STATE

      the app state instance

    • Whether the app is installed or not.

      Returns boolean

    • Serializes the web service to a plain JSON-compatible object. Logger and state are omitted for safety.

      Returns {
          installedRouters: any;
          instanceId: string;
          isInstalled: boolean;
          logger: any;
          middleware: any;
          name: string;
          packageName: string;
          path: string;
          port: number;
          state: any;
      }

      JSON representation of this web service

    • Returns a JSON string representation of this web service.

      Returns string

      stringified JSON of the web service

    • Uninstalls the WebService from the app.

      Parameters

      Returns Promise<any>

    • Removes all currently installed middleware from the Express app.

      Returns Promise<void>