https://github.com/runabol/code-execution-demo
A demo of a remote code execution engine using Tork
https://github.com/runabol/code-execution-demo
arbitrary-code-execution code-execution-engine docker golang remote-code-execution remote-code-execution-engine
Last synced: about 1 month ago
JSON representation
A demo of a remote code execution engine using Tork
- Host: GitHub
- URL: https://github.com/runabol/code-execution-demo
- Owner: runabol
- License: mit
- Created: 2023-09-08T20:01:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-01T17:23:02.000Z (over 1 year ago)
- Last Synced: 2025-04-14T22:14:36.085Z (about 1 month ago)
- Topics: arbitrary-code-execution, code-execution-engine, docker, golang, remote-code-execution, remote-code-execution-engine
- Language: TypeScript
- Homepage:
- Size: 299 KB
- Stars: 9
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Arbitrary Code Execution Demo

Have you ever wondered what happens behind the scenes when you hit "Run" on a code snippet in online development environments like [Go Playground](https://go.dev/play/) or [Repl.it](https://replit.com/)?
## Detailed instructions
[https://dev.to/acoh3n/lets-build-a-code-execution-engine-4kgi](https://dev.to/acoh3n/lets-build-a-code-execution-engine-4kgi)
## Running the demo
You'll need:
- [Go](https://golang.org/) version 1.19 or better installed.
- DockerStart the server:
```bash
go run main.go run standalone
```Execute a code snippet. Example
```bash
curl \
-s \
-X POST \
-H "content-type:application/json" \
-d '{"language":"python","code":"print(\"hello world\")"}' \
http://localhost:8000/execute
```Should output:
```bash
hello world
```You can try changing the `language` to `go` or `bash`.
## Frontend
```shell
cd frontend
npm i
npm run dev
```