Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aavtic/coapi.rs
A Rust Axum Server which responds with code output using API calls.
https://github.com/aavtic/coapi.rs
axum-server code online-compiler rust-lang
Last synced: about 10 hours ago
JSON representation
A Rust Axum Server which responds with code output using API calls.
- Host: GitHub
- URL: https://github.com/aavtic/coapi.rs
- Owner: Aavtic
- License: gpl-3.0
- Created: 2024-09-28T12:07:12.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-10T14:26:08.000Z (4 days ago)
- Last Synced: 2024-11-10T15:18:19.120Z (4 days ago)
- Topics: axum-server, code, online-compiler, rust-lang
- Language: Rust
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![coapi-cropped](https://github.com/user-attachments/assets/9c0857c8-b400-4cec-acc3-25c2facc2277)
Table of Contents
- [coapi.rs](#coapi-rs)
- [Installation](#installation)
-[Modes](#modes)
- [Introduction](#introduction)
- [Usage](#usage)
- [Licesnse](#license)# COAPI-rs
COAPI-rs is is a Rust axum server which responds with the output of code given. The server is still in it's early stages and currently only support execution of [python]
language.## Installation
### Modes
Modes of Installation
- [Manually Compiling](#docker)
- [Downloading-executable](#compile)### Docker
You can clone this repository and then use docker to run the server.
```shell
git clone https://github.com/Aavtic/coapi.rs
```
Then you can build the docker container using this command
This may take some time to set up Rust and download all the dependencies.
```shell
docker build -t rust-app .
```
Now you can run the server using this command.
```shell
docker run --rm -p 8081:8081 rust-app
```
This will start a server on port `8081`. Make sure no other processes are active on that port.### Compile
In-order to compile and run this, you will have to clone this repository and run the server using cargo.
```shell
cargo run
```## Introduction
coapi-rs is a rust axum server which can be used to get output for code by sending http POST requests.
## Usage
Once the program is running You can send POST requests to the server with It's payload in JSON format.
The format of the Payload is simple and straight forward as shown below.{
"code": "print("Hello World!")",
"language": "Python"
}
Make sure to add the `Content-Type` in the header to `application/json`.## License
[MIT](./LICENSE)
[python]: https://www.python.org/downloads/