Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

danillouz/funbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fun😄x

Function sandbox PoC.

Running locally

npm i && npm run dev

Executing a function in a sandbox

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.

Example

Request

POST /run
Content-Type: application/json

{
	"fn": "() => 2 + 2"
}

Response

{
	"fn": "() => 2 + 2",
	"result": 4
}

License

MIT Copyright (c) 2017 Daniël Illouz