From 87b7e4be56cac22b3f7d1bf118c8396423b15b0c Mon Sep 17 00:00:00 2001 From: Nathan Lisgo Date: Fri, 9 Feb 2024 09:59:12 +0000 Subject: [PATCH] Add instructions in README on how to run api locally --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1aee101..5693289 100644 --- a/README.md +++ b/README.md @@ -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/ +```