15 lines
424 B
Bash
Executable File
15 lines
424 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
BASE_URL="${BASE_URL:-http://localhost:8080}"
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
mkdir -p "$ROOT_DIR/output"
|
|
|
|
curl -sS \
|
|
--request POST "$BASE_URL/render" \
|
|
--header 'Content-Type: application/json' \
|
|
--data-binary "@$ROOT_DIR/examples/sample-report.json" \
|
|
--output "$ROOT_DIR/output/sample-report.pdf"
|
|
|
|
echo "PDF: $ROOT_DIR/output/sample-report.pdf"
|