test.ts 928 B

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