Function sandbox PoC.
npm i && npm run dev
After starting the service with npm run dev
, make an HTTP POST
request to
the /run
endpoint. You must send a JSON payload containing a fn
property,
which represents the function you want to execute as a String.
Request
POST /run
Content-Type: application/json
{
"fn": "() => 2 + 2"
}
Response
{
"fn": "() => 2 + 2",
"result": 4
}
MIT Copyright (c) 2017 Daniël Illouz