This utility generates opengraph images.
Make an HTTP request to the endpoint, pass it some parameters, and it will return an image.
This is a webserver process
- HTTP request received
- Validate params
- Generate an HTML page from a tempalte + parameters
- Render that HTML page with a headless web browser
- Screenshot the page using headless browser
- Save that image out to a jpg
- Return the image
Docker is probably the best way to kick the tires.
docker run --name ogaas --rm -p 8000:8000 -v $PWD/templates:/templates ogaas
That will get you going on port 8000
Everything should live in your template file (css and HTML). See the examples to see how it can work for you.