Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 622 Bytes

README.md

File metadata and controls

39 lines (30 loc) · 622 Bytes

Sorobix-formatter

A simple API to format rust code, used for sorobix

API Docs

POST

  • Endpoint: /
  • Request Sample:
    • {
      "code": "Zm4gbWFpbigpIHsgcHJpbnRsbiEoIkhlbGxvIFdvcmxkISIpOyB9"
      }
  • Response Sample:
    • {
      "formatted_code": "Zm4gbWFpbigpIHsKICAgIHByaW50bG4hKCJIZWxsbyBXb3JsZCEiKTsKfQo="
      }

Status Codes

  • 200: formatter_code
  • 400: Invalid/Bad Request
  • 406: Bad Rust Code

Deployment

  • Build the Image
docker build . -t sorobix-formatter
  • Run the Image
docker run -p 3000:3000 sorobix-formatter:latest