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
This commit is contained in:
19
src/repositories/InMemoryRequestRepository.ts
Normal file
19
src/repositories/InMemoryRequestRepository.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user