This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Description
Currently, the SDK only allows the creation of a Queue/Cron by importing the specific NextJS API handler.
Libraries like tRPC have other approaches and we want to align with them.
Possible solution:
import { Queue } from '@serverlessq/core'
const queue = new Queue(...)
const appRouter = trpc
.router()
.mutation('createPost', {
input: z.object({ name: z.string().min(5) }),
async resolve(req) {
...
queue.enqueue(...)
...
},
});