Skip to content

van-ibm/loopback-cf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>'];
}

About

Cloud Foundry component for Loopback

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published