Skip to content

A weasyprint container with a basic endpoint to communicate

License

Notifications You must be signed in to change notification settings

dills122/weasyprint-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeasyPrint Docker Service

CodeFactor

A small stand alone WeasyPrint service

Endpoints

  • /convert/stream - Given an input string, streams pdf to client
  • /convert/base64 - Given an input string, will return converted pdf as base64 string

Both endpoints accept both a url or an html string as the incoming document

Getting Started

git clone https://github.com/dills122/weasyprint-docker.git

Once the repo has been cloned you will need to build the docker container

sudo docker build -t "repo:tagHere" ./

Once the container is built you can run it locally

To run as a background process to test the service

sudo docker run -p 8080:8080 "containerId" &

If you needed to run the container and test stuff inside

sudo docker run -it "containerId" /bin/bash

Testing Node App Locally

if you wanted to change the api without worrying about docker

node index.js # npm start

About

A weasyprint container with a basic endpoint to communicate

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published