Skip to content

InyerM/nest-queues

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest application for practicing queueing with Bull and Redis.

Installation

$ npm install
or
$ yarn install

Running docker compose

$ docker-compose up

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Environment Variables

# .env
PG_USER
PG_PASSWORD
PG_HOST
PG_PORT
PG_DATABASE

Routes

# GET
http://localhost:3000/
# Gets hello world

# GET
http://localhost:3000/invoke-msg?msg=Hello World
# Invokes a message to be queued

# GET
http://localhost:3000/cron-job
# Gets all cron jobs

# POST
http://localhost:3000/cron-job
@ Body
{
  "name": "test",
  "cron": "*/5 * * * * *",
  "data": {
    "msg": "Hello World"
  }
}
# Creates a cron job

# PUT
http://localhost:3000/cron-job
@ Body
{
  "name": "test",
  "cron": "*/5 * * * * *",
  "data": {
    "msg": "Hello World"
  }
  "key": "mycronjobkey"
}
# Updates a cron job

# DELETE
http://localhost:3000/cron-job
@ Body
{
  "key": "mycronjobkey"
}
# Deletes a cron job

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published