npm install @jet-queue/coreimport { JetQueue } from "@jet-queue/core";
const queue = new JetQueue({ concurrency: 3 });
queue.add(
async () => {
console.log("Job done!");
},
{ name: "my-first-job" },
);
queue.on("queue:drain", () => {
console.log("All jobs finished");
});npx @jet-queue/server --port 3001Then connect with the client:
npm install @jet-queue/clientimport { JetQueueClient } from "@jet-queue/client";
const client = new JetQueueClient({ baseUrl: "http://localhost:3001" });
await client.addJob("send-email", { data: { to: "user@test.com" } });