/examples

ℹ️ Various examples on how to use certain features of Judge0.

Primary LanguageC++

ℹ️ Examples

This repository contains various examples that show how you use various features of Judge0.

Before you start exploring these examples, you need to know the following:

  1. Judge0 uses HTTP protocol.
  2. For us, the simplest way to showcase the different features of Judge0 is to use curl in the Bash programming language to communicate with Judge0 via HTTP protocol.
    • You need to find an appropriate HTTP client library for your programming language of choice.
  3. These examples have been tested on Ubuntu 22.04 but should work anywhere you can run Bash scripts.
  4. To have you get started fast, these examples use the Shared Cloud of Judge0 CE and Judge0 Extra CE.
    • There is a FREE plan of Judge0 CE which you can subscribe to here.
    • There is also a FREE plan of Judge0 Extra CE, which you can subscribe to here.

Prerequisites

To successfully run these examples, you will need to:

  1. Subscribe to the FREE plan of Judge0 CE.
  2. Subscribe to the FREE plan of Judge0 Extra CE.
  3. Clone this repository.
  4. Edit the file .env and add the API key that RapidAPI generated for you.
  5. Make sure you have curl and jq installed.

Get Started

  1. Make sure you have fulfilled all prerequisites.
  2. Every example is self-contained; thus, cd into the directory of the example you want to run.
  3. Run the run_example.sh script from within the example directory.
    $ ./run_example.sh