A collection of libraries and tools to create programming challenges and competitions.
- Make sure to have (a recent version of) Node and NPM installed and in
PATH
. - Make sure to have installed tmux
- To install dependencies, run:
( cd server/ ; npm ci )
( cd web/ ; npm ci )
Possible issue
On Ubuntu 18.04 (and maybe other older version) the NPM could not be updated to the latest version available with a default installation.
This could make the previous code to not work because it is not recognizing the comand npm ci
.
To fix this problem you need to upgrade to a recent version of NPM running:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
- Import the example contest with:
( cd server/ ; npm run cli -- import ../examples/example-contest/ )
- TODO: running the server in production
You can run this application with Docker, to have a system ready to use, that you can also use on macOS or Windows.
- Build the Docker container (at this point we don't provide prebuilt ones)
docker build . -t turingarena:turingarena
It will probably take a few minutes, so go to drink a cofee while the system build everything.
- Start the server like this
docker run --privileged -it -p 3000:3000 -v $PWD/server:/data turingarena:turingarena serve
Of course change the port or the working directory (/data) as you wish. It's important to use the --privileged
option,
otherwise the sandbox will not work. You may need root privileges on your system to use that.