Skip to content

Commit

Permalink
Use JSON.stringify in backend deno sample publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
fussel178 committed Dec 9, 2024
1 parent 85569f5 commit ba20b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend-deno/samples/publisher/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JSONCodec, startService } from "jsr:@wuespace/telestion";
import { startService } from "jsr:@wuespace/telestion";
import { z } from "npm:zod";

const { messageBus, config } = await startService();
Expand All @@ -20,7 +20,7 @@ setInterval(() => {
console.log("Publishing", value, "to", DATA_SUBJECT);
messageBus.publish(
DATA_SUBJECT,
JSONCodec().encode(value),
JSON.stringify(value),
);
console.log("Published", value, "to", DATA_SUBJECT);
}, FREQUENCY);

0 comments on commit ba20b48

Please sign in to comment.