Skip to content

Commit

Permalink
docs: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jun 29, 2023
1 parent 5ca2c7f commit 86a9c15
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# tectonic-api

[![main.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/main.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/main.yml)
[![build.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/build.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/build.yml)
[![warmer.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/warmer.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/warmer.yml)
[![dependabot.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/dependabot.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/dependabot.yml)

A simple [axum](https://github.com/tokio-rs/axum) API for compiling TeX/LaTeX with [Tectonic](https://github.com/tectonic-typesetting/tectonic), hosted on Hugging Face Spaces.

## Usage

Simply cURL the endpoint like in the following.

```bash
curl 'https://winstxnhdw-tectonic-api.hf.space/compile' \
-d '{
"latex": "\\documentclass{article}\\begin{document}Hello, world!\\end{document}"
}'
```

## Development

You can spin the server up locally with the following.

```bash
docker build -f Dockerfile.build -t tectonic-api .
docker run --rm -e SERVER_PORT=5000 -p 5000:5000 tectonic-api
```

0 comments on commit 86a9c15

Please sign in to comment.