A free api for executing code in different programming languages (Still in development)
-
Install Docker from https://docs.docker.com/get-docker/
-
Clone the repo into a public GitHub repository
git clone https://github.com/inrittik/code-exec-api.git
-
Go to the project folder
cd code-exec-api
-
Setup the env file
cp .env.example .env.dev
- Start your docker container
docker-compose up -d --build
This will startup the local server at http://localhost:3000
-
Get:
/languages
Get list of langauges supported [C, C++, Java, Python, GoLang, C#]
-
Post:
/execute
execute your code and fetch output results.
Parameters:
- code
- language
- input
Output:
- timestamp
- status
- result
- output
- error
- language
- info