JavaScript (Node.js 20)
Copy
curl -X POST http://localhost:8002/api/v1/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"code": "console.log(\"Hello from Node.js\");",
"language": "javascript"
}'
TypeScript
Copy
curl -X POST http://localhost:8002/api/v1/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"code": "const greeting: string = \"Hello\";\nconsole.log(greeting);",
"language": "typescript"
}'