Skip to content

Commit

Permalink
Add instructions in README on how to run api locally
Browse files Browse the repository at this point in the history
  • Loading branch information
nlisgo committed Feb 9, 2024
1 parent 9da7ad4 commit 87b7e4b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# Enhanced Preprints encoda server

This project contains a light http wrapper around the stencial encoda library, to be used as a standalone microservice in the EPP import pipeline.
This project contains a light http wrapper around the stencila encoda library, to be used as a standalone microservice in the EPP import pipeline.

## Building the docker image

Run `docker build -t epp-encoda --target prod .`

## Running the docker image

Run `docker run -p 3000:3000 epp-encoda`

## Convert JATS to json with api

```bash
cat [LOCATION OF JATS XML] | curl -X POST --data @- http://localhost:3000/
```

## Convert JATS to json with api target a specific encoda version

```bash
cat [LOCATION OF JATS XML] | curl -X POST -H "Accept: application/vnd.elife.encoda.v1.0.1+json" --data @- http://localhost:3000/
```

0 comments on commit 87b7e4b

Please sign in to comment.