A simple event loop pipelining function inspired by ioredis-auto-pipeline.
import { elPipeline } from 'el-pipeline'
import Fastify from 'fastify'
function getServer() {
const server = Fastify({
logger: false
})
server.post('/queue', (req, reply) => {
for (const item of req.body) {
elPipeline(console.log, item)
}
reply.send('OK')
})
return server
}
npm i el-pipeline
MIT
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.