Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikiival/vercelgl
Use serverless chrome on your vercel
https://github.com/vikiival/vercelgl
puppeteer serverless-chrome vercel webgl
Last synced: about 2 months ago
JSON representation
Use serverless chrome on your vercel
- Host: GitHub
- URL: https://github.com/vikiival/vercelgl
- Owner: vikiival
- Created: 2024-01-02T10:59:42.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-04T18:48:12.000Z (10 months ago)
- Last Synced: 2024-10-12T01:36:33.270Z (3 months ago)
- Topics: puppeteer, serverless-chrome, vercel, webgl
- Language: TypeScript
- Homepage: https://capturegl.vercel.app
- Size: 45.9 KB
- Stars: 18
- Watchers: 3
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## VercelGL
VercelGL is a simple, lightweight API to use serverless chrome.
It is designed to be used with the [Vercel](https://vercel.com) platform, but can be used anywhere.## Usage
currently there is only one route implemented
```
POST /api/screenshot
```Body
> Bear in mind that this app is more like template so fill free to bend for your use case (mine is looking for `` the web)
```json
{
"url": "https://bafybeigsw7gagsmvxxivt5kvrl6ueld7yszzef2aylxbzzafez6ybxscca.ipfs.nftstorage.link"
}
```## FAQ
### This example does not work
Seems that many users have problem with paths etc.
Using **pnpm** as package manager seemed to make a difference.### I am getting 504 HTTP error
Please increase `maxDuration` for the serverless functions in `vercel.json`:
```json
"functions": {
"api/**/*": {
"maxDuration": 60
}
}
```### Reference
https://gist.github.com/kettanaito/56861aff96e6debc575d522dd03e5725