updated readme

This commit is contained in:
Brian Seymour 2021-04-22 21:30:01 -05:00
parent 09983a5fa5
commit 04990566a1
4 changed files with 51 additions and 36 deletions

View File

@ -64,7 +64,7 @@ const app = express();
if (!errors.isEmpty()) {
return res
.status(422)
.status(400)
.send({
message: errors.array()
});

View File

@ -1,9 +1,14 @@
<h1 align="center">
<a href="https://github.com/engineer-man/piston"><img src="var/docs/images/icon_circle.svg" width="25" height="25" alt="engineer-man piston"></a>
<a href="https://github.com/engineer-man/piston">
<img src="var/docs/images/piston.svg" width="32" height="32" style="vertical-align: middle;" alt="engineer-man piston" />
</a>
<span>
Piston
</span>
</h1>
<h3 align="center">A high performance general purpose code execution engine.</h3>
<br>
<p align="center">
@ -40,19 +45,26 @@
Piston is a high performance general purpose code execution engine. It excels at running untrusted and
possibly malicious code without fear from any harmful effects.
</h4>
<br>
It's used in numerous places including:
* [EMKC Challenges](https://emkc.org/challenges),
* [EMKC Weekly Contests](https://emkc.org/contests),
* [Engineer Man Discord Server](https://discord.gg/engineerman),
* [I Run Code (Discord Bot)](https://github.com/engineer-man/piston-bot) bot as well as 1300+ other servers
and 100+ direct integrations.
* [EMKC Challenges](https://emkc.org/challenges)
* [EMKC Weekly Contests](https://emkc.org/contests)
* [Engineer Man Discord Server](https://discord.gg/engineerman)
* [I Run Code (Discord Bot)](https://github.com/engineer-man/piston-bot) bot as well as 4000+ other servers
and 200+ direct integrations.
To get it in your own server, go here: https://emkc.org/run.
<br>
### Official Extensions
The following are approved and endorsed extensions/utilities to the core Piston offering.
- [Piston CLI](https://github.com/Shivansh-007/piston-cli), a universal shell supporting code highlighting, files, and interpretation without the need to download a language.
<br>
# Public API
- Requires no installation and you can use it immediately.
@ -197,10 +209,10 @@ This endpoint requests execution of some arbitrary code.
- `files` (**required**) An array of files containing code or other data that should be used for execution. The first file in this array is considered the main file.
- `files[].name` (**optinal**) The name of the file to upload, must be a string containing no path.
- `files[].content` (**required**) The content of the files to upload, must be a string containing text to write.
- `stdin` (**optional**) The text to pass as stdin to the program. Must be a string, can be left blank.
- `args` (**optional**) The arguments to pass to the program. Must be an array.
- `compile_timeout` (**optional**) The maximum time allowed for the compile stage to finish before bailing out in milliseconds. Must be a number.
- `run_timeout` (**optional**) The maximum time allowed for the run stage to finish before bailing out in milliseconds. Must be a number.
- `stdin` (*optional*) The text to pass as stdin to the program. Must be a string, can be left blank.
- `args` (*optional*) The arguments to pass to the program. Must be an array.
- `compile_timeout` (*optional*) The maximum time allowed for the compile stage to finish before bailing out in milliseconds. Must be a number.
- `run_timeout` (*optional*) The maximum time allowed for the run stage to finish before bailing out in milliseconds. Must be a number.
```json
{
@ -208,6 +220,7 @@ This endpoint requests execution of some arbitrary code.
"version": "15.10.0",
"files": [
{
"main": true,
"name": "my_cool_code.js",
"content": "console.log(process.argv)"
}
@ -240,6 +253,7 @@ Content-Type: application/json
}
}
```
If a problem exists with the request, a `400` status code is returned and the reason in the `message` key.
```json
HTTP/1.1 400 Bad Request

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><defs><style>.cls-1{fill:#131424;}.cls-2{fill:url(#linear-gradient);}</style><linearGradient id="linear-gradient" x1="313.84" y1="162.5" x2="158.19" y2="318.15" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#53c7e5"/><stop offset="0.5" stop-color="#1ea4dd"/><stop offset="1" stop-color="#167ec1"/></linearGradient></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_4" data-name="Layer 4"><rect class="cls-1" width="512" height="512"/><path class="cls-2" d="M227.17,255.54V371.65l-44.95-29.47V281.23Zm30.38,47.15,98.23-51.21v-47l-128.19-64.1L182.22,163.2v55.13l45.37-25.54,69.09,35.38-39,17.08Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 734 B