No description
Find a file
2023-10-03 21:51:37 +02:00
src initial commit 2023-10-03 21:51:37 +02:00
.env initial commit 2023-10-03 21:51:37 +02:00
.gitignore initial commit 2023-10-03 21:51:37 +02:00
Dockerfile initial commit 2023-10-03 21:51:37 +02:00
package.json initial commit 2023-10-03 21:51:37 +02:00
pnpm-lock.yaml initial commit 2023-10-03 21:51:37 +02:00
README.md initial commit 2023-10-03 21:51:37 +02:00
tsconfig.json initial commit 2023-10-03 21:51:37 +02:00

Pinguin

Pinguin is a simple service for monitoring websites. It is written in Node.js and uses Redis as message broker. Its composed of two parts: ingress and worker. Ingress is responsible for receiving HTTP requests and forwards them to workers through BullMQ.

Build instructions

# build an image
docker build -t haxagon/pinguin .

# push an image to private registry
docker push haxagon/pinguin

Development

# install dependencies
npm install

# build
npm run build

# start local redis server
docker run -d --name redis -p 127.0.0.1:6379:6379 --rm redis:latest

Start Ingress

APPLICATION_ROLE='ingress' ./node_modules/nodemon/bin/nodemon.js lib/bradlo.js

Start Worker

APPLICATION_ROLE='worker' ./node_modules/nodemon/bin/nodemon.js lib/bradlo.js

API

POST /ping

curl --json '{"domain": "seznam.cz"}' -X POST localhost:3000/ping