A simple API to format rust code, used for sorobix
- Endpoint:
/ - Request Sample:
-
{ "code": "Zm4gbWFpbigpIHsgcHJpbnRsbiEoIkhlbGxvIFdvcmxkISIpOyB9" }
-
- Response Sample:
-
{ "formatted_code": "Zm4gbWFpbigpIHsKICAgIHByaW50bG4hKCJIZWxsbyBXb3JsZCEiKTsKfQo=" }
-
200: formatter_code400: Invalid/Bad Request406: Bad Rust Code
- Build the Image
docker build . -t sorobix-formatter- Run the Image
docker run -p 3000:3000 sorobix-formatter:latest