test.ts 996 B

1234567891011121314151617181920212223242526272829
  1. import { map, Observable, of, take } from "rxjs";
  2. import * as fs from "fs"
  3. import { AcknowledgementService } from "../services/acknowledgemeent.service";
  4. import { StreamingService } from "./stream";
  5. import { SyncrhonizationService } from "../services/synchronization.service";
  6. import { LogSetting } from "../dependencies/fisloggingservice/type/datatype";
  7. const acknowledge = new AcknowledgementService()
  8. const syncrhonize = new SyncrhonizationService()
  9. const streamService = new StreamingService()
  10. // Configure Log Setting
  11. const storage: LogSetting = {
  12. storage: "File",
  13. setting: {
  14. appName: 'Default from client',
  15. appLocName: 'To be generated in client',
  16. logLocName: 'To be generated in client',
  17. }
  18. }
  19. // console.log(`I am Client 1`)
  20. // syncrhonize.synchronize()
  21. /* -------------- ACTION -------------------- */
  22. const payload = streamService.stream()
  23. acknowledge.init(storage).then(() => {
  24. acknowledge.subscribe(payload)
  25. }).catch((e) => console.error(e))