loopback-cf
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

loopback-appid

Conveniently adds Cloud Foundry services to Loobpack 4.

Usage

Within your index.ts main function, add the component to your app.

import { CloudFoundryComponent } from 'loopback-cf';

export async function main(options: ApplicationConfig = {}) {
  const app = new Application(options);

  // should go first to load Cloud Foundry services for downstream components
  app.component(CloudFoundryComponent);

  ...
}

Then anywhere you have Loopback code, you can inject the ApplicationConfig and retrieve Cloud Foundry services.

constructor(
  @inject(CoreBindings.APPLICATION_CONFIG) options: any = {},
) {
  const credentials = options['<some-service-name>'];
}

/loopback-cf/

    Package Sidebar

    Install

    npm i loopback-cf

    Weekly Downloads

    3

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    18.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • van-ibm