// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved. // Node module: @loopback/example-express-composition // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; const config = { name: 'ds', connector: 'memory', localStorage: '', file: './data/ds.json', }; export class DsDataSource extends juggler.DataSource { static dataSourceName = 'ds'; static readonly defaultConfig = config; constructor( @inject('datasources.config.ds', {optional: true}) dsConfig: object = config, ) { super(dsConfig); } }