Skip to content
No description, website, or topics provided.
TypeScript CSS JavaScript C Python HTML Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


CPlayground is an online sandbox that makes it easy to quickly test out C or C++ code. A specific goal of the project is to offer strong support for OS constructs such as multiprocessing and multithreading.

Build instructions

I have only tested these instructions on Ubuntu, but they should work on other Linux flavors with modification.

Install NodeJS:

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Install and configure Docker:

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] bionic stable"
sudo apt update
sudo apt install docker-ce

You will probably want to add the user running cplayground to the docker group, so that you don't need to run the server as root:

sudo usermod -aG docker $USER

In order to support memory limits on containers (highly recommended to limit DDoS attacks), you need to edit /etc/default/grub and modify the GRUB_CMDLINE_LINUX variable:

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"


sudo update-grub
sudo reboot

Install project dependencies and build:

sudo apt-get install -y build-essential make
cd cplayground/
npm install
sudo docker build -t cplayground src/server/docker-image/
npm run-script build

Create a MySQL database called cplayground and add a user for this database. Then run the server:

export DB_URL="mysql://username:password@localhost"
node src/server/migrations.js up
npm run-script serve
You can’t perform that action at this time.