Skip to content

Commit

Permalink
env variable documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Jul 1, 2018
1 parent 1ccf5c3 commit 096f240
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ide
.idea
.DS_Store

# output
*.pdf
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
![](./assets/mast.jpg)

[![](https://images.microbadger.com/badges/image/txn2/txpdf.svg)](https://microbadger.com/images/txn2/txpdf "n2pdf")

# txPDF

txPDF is an HTML to PDF microservice by [txn2]

## Docker Use

Run the [txPDF Docker container] on your local workstation for testing. Forward port **8080** or any free port to txPDFs default service port **8080** on the container.

```bash
docker run --rm -p 8080:8080 -e DEBUG=true txn2/txpdf
```

[txPDF] can be configured with the following environment variables:

| Variable | Default | Purpose |
| -------- | ------- | ------- |
| PORT | 8080 | Server listen port |
| DEBUG | false | Verbose logging |
| BASE_PATH | | Base path for routes. Prepends onto web service routes **BASE_PATH**/getPdf and **BASE_PATH**/status |
| TOC_XSL | | Path to XSL transformation script for Table of Contents (example **./toc.xsl**. Container holds a default **./toc.xsl** |

## Test

```bash
curl -d "@examples/multi-site.json" -X POST http://localhost:8080/getPdf --output test.pdf
```

[txn2]:https://github.com/txn2
[txPDF]:https://github.com/txn2/txpdf
[txn2]:https://github.com/txn2
[txPDF Docker container]:https://hub.docker.com/r/txn2/txpdf/

0 comments on commit 096f240

Please sign in to comment.