0.10.0 • Published 5 years ago

@quirrel/next v0.10.0

Weekly downloads
178
License
MIT
Repository
github
Last release
5 years ago

@quirrel/next

Quirrel is the Task Queueing Solution for Next.js X Vercel.

Getting Started

Check out Getting Started Guide or the Quirrel Tutorial to get the full picture.

  1. npm install @quirrel/next
  2. Create a new API Route and export a Quirrel Queue:
// pages/api/emailQueue.js
import { Queue } from "@quirrel/next"

export default Queue("emailQueue", async (job) => {
  await dispatchEmail(job.recipient, job.subject, ...);
})
  1. Import & use from another file to enqueue jobs:
// pages/api/signup.js
...
import emailQueue from "./emailQueue"

export default async (req, res) => {
  // create user ...
  await emailQueue.enqueue({
    recipient: user.email,
    subject: "Welcome to Quirrel!",
    ...
  })
}

How does it work?

When calling .enqueue, a request to api.quirrel.dev is made. It contains an endpoint to call (in the example above, that'd be /api/emailQueue) and a timestamp of when it should be called. The Quirrel API will then call the corresponding endpoint on time.

In Development

Quirrel is currently in development. I will post updates on Twitter.

0.10.0

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago