Code Monkey home page Code Monkey logo

bullmqdemo's Introduction

BullMQ Demo

This is a simple demo application that shows how to use BullMQ, a popular job processing library for Node.js, with a user interface.

Prerequisites

  • Node.js (version 14 or higher)
  • Redis (version 6 or higher)

Getting Started

Clone the repository

git clone https://github.com/your-username/bullmqdemo.git
cd bullmqdemo

Install the dependencies:

npm install

Start the Redis server:

docker run -p 6379:6379 -d redis:6.2.6

Or, if you have Redis installed locally, start the Redis server using your preferred method.

Run the Express server and worker:

node start.js

This command will run both the server and the worker concurrently.

Access the BullMQ UI:

Open your browser and navigate to http://localhost:3000/admin/queues.

Usage Adding Jobs To add a job to the queue, send a POST request to http://localhost:3000/addJob with a JSON body containing the job data:

curl -X POST -H "Content-Type: application/json" -d '{"jobData": "test"}' http://localhost:3000/addJob

Viewing Jobs To view the jobs in the queue, access the BullMQ UI at http://localhost:3000/admin/queues.

Worker The worker is responsible for processing the jobs in the queue. It listens for new jobs and processes them as they become available.

Technologies Used BullMQ: A popular job processing library for Node.js. Express: A web framework for Node.js. TypeScript: A statically typed superset of JavaScript. Redis: An in-memory data structure store, used as a database, cache, and message broker. WebSocket: A protocol for real-time communication between a client and a server.

bullmqdemo's People

Contributors

sayinmehmet47 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.