A lightweight proxy for the SportsRadar API, simplifying integration and resolving CORS issues.
β
Automatic API Key Handling β Appends API key to all forwarded requests
β
Transparent Responses β Returns exact results from the SportsRadar API
β
CORS-Friendly β Enables access from any domain, avoiding browser CORS issues
Effortless SportsRadar API access, with no headaches! π
Install runtime dependencies using the corresponding script for your OS:
sh install-on-mac.sh
1οΈβ£ Set up your API Key:
cp .sample.env .env
# Edit .env to set your API key
2οΈβ£ Start the proxy using Docker Compose:
docker-compose up -d
After startup, access the API locally:
π http://localhost:8080/nfl/... (forwards requests to the SportsRadar API)
3οΈβ£ Check logs, if necessary:
docker-compose logs -f
4οΈβ£ Stop the service:
docker-compose down
This project is developed using Camel JBang and GraalVM. These dependencies should be installed on your local machine to aid further development of the project.
Install dependencies (JBand & Apache Camel) for development:
sh setup-4-dev-on-mac.sh
For native image testing, additionally install GraalVM:
sdk install java 23.0.2-graal
Routes are defined in: π src/main/resources/camel/routing.camel.yaml
π Find available components: Camel Components Documentation
Quickly test changes to routes with:
camel run camel-jbang.properties ./**/*.camel.yaml
You can use and extend the prepared HTML sample file underneath src/test/resources/sample.html
to check whether your adjustments worked correctly.
Compile the application:
./mvnw clean package
Run the packaged JAR:
java -jar target/quarkus-app/quarkus-run.jar
Build the Docker image:
docker build -f Dockerfile -t sport-radar-proxy:latest .
If you want to build and immediately run the new container version, you can do so by using the prepared docker-compose.local-jvm.yaml
:
docker-compose up -d -f docker-compose.local-jvm.yaml
For a smaller, faster native container run the following:
docker build -f Dockerfile.native -t sport-radar-proxy:native-latest .
If you want to build and immediately run the new native container version, you can do so by using the prepared docker-compose.local-native.yaml
:
docker-compose up -d -f docker-compose.local-native.yaml
This project is licensed under the Apache License 2.0.