Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 575 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 575 Bytes

OpenFaaS Code Eval

Code eval as a service. Powered by OpenFaaS.

Setup

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"}%