• Stars
    star
    7
  • Rank 2,294,772 (Top 46 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A demo of a remote code execution engine using Tork

Arbitrary Code Execution Demo

screenshot

Have you ever wondered what happens behind the scenes when you hit "Run" on a code snippet in online development environments like Go Playground or Repl.it?

Detailed instructions

https://dev.to/acoh3n/lets-build-a-code-execution-engine-4kgi

Running the demo

You'll need:

  • Go version 1.19 or better installed.
  • Docker

Start the server:

go run main.go run standalone

Execute a code snippet. Example

curl \
  -s \
  -X POST \
  -H "content-type:application/json" \
  -d '{"language":"python","code":"print(\"hello world\")"}' \
  http://localhost:8000/execute

Should output:

hello world

You can try changing the language to go or bash.

Frontend

cd frontend
npm i
npm run dev