diff --git a/README.md b/README.md index 6ad4bfa..70a0b10 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ If you need guaranteed availability, [deploy it yourself](#deploy). You can convert markdown by sending a `POST` request to `https://md-to-pdf.fly.dev`. - curl --data-urlencode 'markdown=# Heading 1' --output md-to-pdf.pdf https://md-to-pdf.fly.dev +```shell +curl --data-urlencode 'markdown=# Heading 1' --output md-to-pdf.pdf https://md-to-pdf.fly.dev +``` | Parameter | Required | Description | |------------|----------|-------------------------------------------------------------------------------------------------------| @@ -24,14 +26,27 @@ You can convert markdown by sending a `POST` request to `https://md-to-pdf.fly.d Send data from files like this: - curl --data-urlencode "markdown=$(cat example.md)" +```shell +curl --data-urlencode "markdown=$(cat example.md)" +``` ## Deploy A prebuilt container image is available at [Docker Hub](https://hub.docker.com/r/spawnia/md-to-pdf). +The container starts up the web service and listens for HTTP on port 8000. + You can run it yourself like this: - docker run --publish=8000:8000 spawnia/md-to-pdf +```shell +docker run --publish=8000:8000 spawnia/md-to-pdf +``` + +You may configure the webserver through [Rocket environment variables](https://rocket.rs/guide/v0.5/configuration#environment-variables). +For example, you could allow larger payloads by increasing the limit for form data: + +```dotenv +ROCKET_LIMITS={form="1MiB"} +``` ## Built with diff --git a/static/index.html b/static/index.html index dbb9787..4d4cc92 100644 --- a/static/index.html +++ b/static/index.html @@ -88,7 +88,9 @@