Extremely fast online playground for every programming language.
Go to file
Radon Rosborough 19c42a8049 Successfully receive websocket data on frontend 2020-06-06 11:17:15 -06:00
backend/src Successfully receive websocket data on frontend 2020-06-06 11:17:15 -06:00
frontend Successfully receive websocket data on frontend 2020-06-06 11:17:15 -06:00
scripts Successfully receive websocket data on frontend 2020-06-06 11:17:15 -06:00
.gitignore JavaScript build system hell 2020-06-06 10:28:13 -06:00
Dockerfile Fix up pid1 2020-06-05 19:47:39 -06:00
LICENSE.md Add MIT License 2020-06-05 12:01:40 -06:00
Makefile Fix up pid1 2020-06-05 19:47:39 -06:00
README.md API draft, lang config, more utils 2020-06-05 22:21:55 -06:00
package.json Embed terminal on frontend app 2020-06-06 10:41:55 -06:00
tsconfig.json JavaScript build system hell 2020-06-06 10:28:13 -06:00
webpack.config.js Embed terminal on frontend app 2020-06-06 10:41:55 -06:00
yarn.lock Embed terminal on frontend app 2020-06-06 10:41:55 -06:00

README.md

Fast Sandbox

This project is a work in progress and does not contain any serious documentation.

API

POST /api/v1/ws?lang=python

The API is based on message passing.

Server messages

Received output from process.

{
  "event": "terminalOutput",
  "output": ">>> "
}

Package name completions.

{
  "event": "packageNameCompletions",
  "packageNameCompletions": ["Flask", "Flask-Talisman"],
  "messageSerial": 42
}

Client messages

Received input from user.

{
  "event": "terminalInput",
  "input": "print('Hello, world!')\n"
}

User wants to run code.

{
  "event": "runCode",
  "code": "import this"
}

User wants to install a package.

{
  "event": "installPackage",
  "packageName": "Flask"
}

Complete package names.

{
  "event": "completePackageName",
  "partialPackageName": "fla",
  "messageSerial": 42
}