Files
SpeedTest/src/repositories/InMemoryRequestRepository.ts
Alexander Zinn 21b9e52f40 Add frontend speed test application and server setup
* Introduced a new HTML frontend for network speed testing with a responsive UI
* Implemented backend server functionality to serve the frontend and handle speed test APIs
* Added speed test logic for downloading and uploading data, including progress tracking and result validation
* Created README-SPEEDTEST.md for documentation on application architecture, setup, and usage.
* Updated package.json to include necessary scripts and dependencies for development and testing
2025-11-21 04:56:18 -05:00

20 lines
536 B
TypeScript

import type { IRequestRepository } from '../core/interfaces/IRequestRepository';
import type { SpeedTestContext } from '../core/domain/SpeedTestTypes';
export class InMemoryRequestRepository implements IRequestRepository {
private readonly _storage: Record<string, SpeedTestContext> = {};
save(id: string, context: SpeedTestContext): void {
this._storage[id] = context;
}
get(id: string): SpeedTestContext | undefined {
return this._storage[id];
}
delete(id: string): void {
delete this._storage[id];
}
}