Skip to content

How to use --port flag #125

Answered by simonhaenisch
KevinYangMay asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, basically like md-to-pdf --port 12345. TBH I don't think there's really a use case for it, because the process just finds an available port automatically by default (using https://github.com/sindresorhus/get-port). A port is needed because it spins up a local file server... if you want to know why, i suggest you jump into the source code but basically it's so that the Puppeteer browser instance that is used to generate the PDF can access images via relative paths.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KevinYangMay
Comment options

Answer selected by simonhaenisch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants