import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; import config from './appointment-feedback-service.datasource.json'; // Observe application's life cycle to disconnect the datasource when // application is stopped. This allows the application to be shut down // gracefully. The `stop()` method is inherited from `juggler.DataSource`. // Learn more at https://loopback.io/doc/en/lb4/Life-cycle.html export class AppointmentFeedbackServiceDataSource extends juggler.DataSource { static dataSourceName = 'AppointmentFeedbackService'; static readonly defaultConfig = config; constructor( @inject('datasources.config.AppointmentFeedbackService', { optional: true, }) dsConfig: object = config, ) { Object.assign(dsConfig, { options: {baseUrl: process.env.PATIENT_SERVICE_URL}, }); super(dsConfig); } }