Skip to content

Commit 8434ff9

Browse files
authored
Create README.md
1 parent 1592eff commit 8434ff9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# puppeteer-screenshot
2+
3+
Vercel app for taking screenshots of web pages using Puppeteer
4+
5+
Original code by [@styfle](https://github.com/styfle) in [this pull request](https://github.com/vercel/now-examples/pull/207).
6+
7+
I upgraded the code to work with the latest Vercel and added a `?key=` mechanism to protect it from unauthorized access.
8+
9+
## Usage
10+
11+
Set a Vercel secret called `SECRET_KEY` with a random string in it (I generated mine by running `uuidgen | md5`), then deploy.
12+
13+
You can access screenshots for pages using:
14+
15+
https:/.../zeit.co/blog?type=png&key=...
16+
17+
Screenshots can take several seconds to generate so it's a good idea to cache them somewhere.

0 commit comments

Comments
 (0)