Files
Canteen-Management-System/backend/run-with-razorpay.sh
2026-07-24 12:06:56 +05:30

23 lines
585 B
Bash
Executable File

#!/usr/bin/env bash
# Start the backend with Razorpay credentials loaded from razorpay.env
set -euo pipefail
cd "$(dirname "$0")"
if [[ ! -f razorpay.env ]]; then
echo "Missing razorpay.env — copy razorpay.env.example and fill in your keys."
exit 1
fi
set -a
# shellcheck disable=SC1091
source ./razorpay.env
set +a
if [[ -z "${RAZORPAY_KEY_ID:-}" || -z "${RAZORPAY_KEY_SECRET:-}" ]]; then
echo "RAZORPAY_KEY_ID / RAZORPAY_KEY_SECRET must be set in razorpay.env"
exit 1
fi
echo "Starting backend with Razorpay key: ${RAZORPAY_KEY_ID:0:12}..."
exec ./mvnw spring-boot:run