Skip to content

Commit

Permalink
Merge 817e1af into 37092a2
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwestendorf committed Jan 14, 2020
2 parents 37092a2 + 817e1af commit aa0ee57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -66,6 +66,11 @@ You might be rendering a Javascript heavy page, so it's helpful to let `chrome`
- [Swift](https://github.com/danielwestendorf/breezy-pdf-lite/issues/7)
- [Python](https://github.com/danielwestendorf/breezy-pdf-lite/issues/8)
- [Go](https://github.com/danielwestendorf/breezy-pdf-lite/issues/10)

#### Docker

`docker run -it -p 5002:5002 -e "DEBUG=breezy-pdf-lite:*" -e "PORT=5002" -e "PRIVATE_TOKEN=YOURSUPERSECRETTOKEN" breezypdf/breezy-pdf-lite:latest`

#### Non-Heroku

1. Install node & yarn
Expand Down
5 changes: 1 addition & 4 deletions index.js
Expand Up @@ -10,9 +10,7 @@ console.log('Starting Google Chrome')

ChromeLauncher.launch({
chromeFlags: ['--headless', '--disable-gpu', '--disable-dev-shm-usage', '--no-sandbox', '--hide-scrollbars'],
chromePath: (process.env.GOOGLE_CHROME_SHIM || '/usr/bin/google-chrome'),
port: 9222,
connectionPollInterval: 10
port: 9222
}).then((chrome) => {
console.log(`Chrome debugging port running on ${chrome.port}`)

Expand All @@ -22,7 +20,6 @@ ChromeLauncher.launch({
})

webServer.start()
console.log('Starting web server...')
}).catch((error) => {
console.error(error)
console.error('Exiting')
Expand Down
2 changes: 2 additions & 0 deletions lib/server.js
Expand Up @@ -27,6 +27,8 @@ module.exports = class Server {
extended: true
}))

this.app.get('/', (req, res) => res.send('OK'))

this.app.post('/render/html', async (req, res) => {
this.log('Attempting to render HTML')
let pdf
Expand Down

0 comments on commit aa0ee57

Please sign in to comment.