mirror of
https://github.com/danbulant/pinguin
synced 2026-05-19 04:08:43 +00:00
No description
| src | ||
| .env | ||
| .gitignore | ||
| Dockerfile | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
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