HUB
Sign inSign up

muhammadhassan34/hooklex-server

By muhammadhassan34

•Updated 7 days ago

backend server and API engine for hooklex

Image
Networking
Developer tools
Monitoring & observability
0

193

muhammadhassan34/hooklex-server repository overview

⁠Hooklex Server

Backend server and API engine for Hooklex⁠, a webhook testing platform. It receives and stores incoming HTTP requests, serves them to the UI, and runs background cleanup jobs. Pair it with the hooklex-client⁠ image.

⁠Documentation

Hooklex includes its own documentation, and you can read it in two ways:

  • In the app: run the server together with the client image, then open http://localhost:3000/docs⁠ for a fully rendered documentation site (features, isReplay, exports, and more). If you changed CLIENT_PORT, use http://localhost:<CLIENT_PORT>/docs.
  • In the code: browse the .mdx documentation files in the GitHub repository⁠.

⁠Quick Start

A PostgreSQL database is required. Database migrations are applied automatically on startup (Prisma), so no manual setup is needed.

docker run -d \
  --name hooklex-server \
  -p 5000:5000 \
  -e SERVER_PORT=5000 \
  -e CLIENT_PORT=3000 \
  -e DATABASE_URL="postgresql://user:password@host:5432/hooklex" \
  muhammadhassan34/hooklex-server

⁠Environment Variables

VariableDefaultDescription
SERVER_PORT5000Port the server listens on.
CLIENT_PORT3000Port of the Hooklex client. Used for CORS / allowed origin.
DATABASE_URLnone (required)PostgreSQL connection string.

CLIENT_PORT and SERVER_PORT must be identical on the client and server images.

⁠Arguments (optional)

All arguments are optional.

ArgumentDefaultDescription
--read-limit100Maximum read requests per minute, per IP.
--write-limit100Maximum write requests per minute, per IP.
--expire-after1Days to keep stored request data before it expires.
--cron-schedule*/1 * * * *Cron schedule for the cleanup jobs (default: every minute).

The cleanup jobs remove deleted collections, expired requests, and deleted requests so the database does not grow or get stuck. A short interval is recommended.

Docker Compose:

services:
  server:
    image: muhammadhassan34/hooklex-server
    command:
      - "dist/start-all.js"   # mandatory entry point
      - "--read-limit"
      - "${READ_LIMIT:-100}"
      - "--write-limit"
      - "${WRITE_LIMIT:-100}"
      - "--expire-after"
      - "${EXPIRE_AFTER:-1}"
      - "--cron-schedule"
      - "${CRON_SCHEDULE:-*/1 * * * *}"

One-off run:

docker compose run --rm <SERVICE_NAME> node dist/start-all.js --read-limit 500 --write-limit 500

⁠Ports & Volumes

  • Port: 5000 by default (set by SERVER_PORT). Publish the same port you set.
  • Volumes: None. All data is stored in PostgreSQL.

Tag summary

Content type

Image

Digest

sha256:26a42be28…

Size

170 MB

Last updated

7 days ago

docker pull muhammadhassan34/hooklex-server