https://github.com/unasuke/url2img
https://github.com/unasuke/url2img
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/unasuke/url2img
- Owner: unasuke
- License: mit
- Created: 2019-08-15T11:58:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T15:18:39.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T14:55:30.678Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# url2img
## Usage
```shell
$ curl -v -X POST --header "Content-Type: application/json" --data '{"url": "https://example.com, "size": {"width": 2400, "height": 1260 }}' http://function-url --output ogp.png
```
## Deploy
```shell
$ gcloud functions deploy url2img --runtime nodejs10 --trigger-http --region asia-northeast1 --entry-point screenshot
```
## References
- [Introducing headless Chrome support in Cloud Functions and App Engine | Google Cloud Blog](https://cloud.google.com/blog/products/gcp/introducing-headless-chrome-support-in-cloud-functions-and-app-engine)
- [HTTP Functions | Cloud Functions Documentation | Google Cloud](https://cloud.google.com/functions/docs/writing/http)
- [GoogleCloudPlatform/functions-framework-nodejs: FaaS (Function as a service) framework for writing portable Node.js functions](https://github.com/GoogleCloudPlatform/functions-framework-nodejs)