mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-13 03:25:32 +00:00
13 lines
313 B
JavaScript
Executable File
13 lines
313 B
JavaScript
Executable File
const { EventService } = require("micro-js-client/event");
|
|
|
|
// Consume events from a given topic.
|
|
async function consumeFromAtopic() {
|
|
let eventService = new EventService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await eventService.consume({
|
|
topic: "user",
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
consumeFromAtopic();
|