/run-api

run-api s a REST api for running untrusted code inside docker containers.

Primary LanguageGo

run-api

Run api allows to execute code inside docker containers.

Usage

POST /run

Desc

Executes the code inside docker container.

Request

Example request that prints text passed with stdin.

{
    "config": {
        "language": "golang"
    },
    "stdin": "test",
    "files": [
        {
            "name": "main.go",
            "body": "package main \n import (\n \"fmt\" \n \"bufio\" \n \"os\" \n ) \n func main() { reader := bufio.NewReader(os.Stdin) \n name, _ := reader.ReadString('\\n') \n fmt.Println(name) }"
        }
    ]
}