Code eval as a service. Powered by OpenFaaS.
Spin up OpenFaas:
$ docker swarm init
$ git clone https://github.com/openfaas/faas && \
cd faas && \
./deploy_stack.sh
Run a build with the faas-cli:
$ faas-cli build -f template.yml
Deploy:
$ faas-cli deploy -f template.yml
Test:
$ curl -X POST http://localhost:8080/function/eval -d \
'{"code": "let test = 4; console.log(test + 21)"}'
{"status":"success","results":"25"}%