Created
November 11, 2020 08:42
-
-
Save elblivion/c71038156fa5fd51d4d61dcd14a3a6a9 to your computer and use it in GitHub Desktop.
Dockerised headless Fastly-Debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm --shm-size=512m buildkite/puppeteer node -e " | |
require('puppeteer').launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] }) | |
.then(browser => browser.newPage() | |
.then(page => page.goto('https://www.fastly-debug.com') | |
.then(() => page.waitFor(() => document.querySelector('#json').textContent)) | |
.then(jsonEl => jsonEl.jsonValue()) | |
.then(console.log) | |
.finally(() => page.close()) | |
).finally(() => browser.close()), | |
err => console.log('Error fetching Fastly debug info', err) | |
) | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment