Skip to content

Commit

Permalink
feat(driver): add base in-memory driver (#3147)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 authored Oct 7, 2024
1 parent 8a616ee commit e520410
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions libs/driver/in-memory/src/driver/base.class.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { InMemoryBackendConfigArgs } from 'angular-in-memory-web-api';

/**
* The base class for in-memory drivers.
*/
export abstract class DaffInMemoryDriverBase {
/**
* The URL of the corresponding backend.
*/
protected readonly url = `/${this.config.apiBase}/${this.collectionName}`;

constructor(
private config: InMemoryBackendConfigArgs,
private collectionName: string,
) {}
}
1 change: 1 addition & 0 deletions libs/driver/in-memory/src/driver/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './base.class';
1 change: 1 addition & 0 deletions libs/driver/in-memory/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './backend/public_api';
export * from './driver/public_api';

0 comments on commit e520410

Please sign in to comment.