Render bundled SVG templates to PNG images, return them by HTTP, using GET query string as template context.
$ npm ci
$ npm run dev
$ http GET http://<service.url>/homework-template.png?name=Константин Константинопольской&sex=m Authorzation:"Bearer: <YOUR-SECRET-TOKEN>
This services gets automatically deployed to heroku upon push to the master. The docker image is built on heroku's premises
First, you have to create and svg image out of the mock-up. Here is an example using figma:
Second, convert it tu utf-8. for text to become readable by a human. In MacOS or Linux: xmllint --format --encode utf-8 downloaded.svg > downloaded-readble.svg
.
Third, create a text template out of the SVG, using nonjucks variable substitution and condigitional tags. Place the resulting file to the templates/ folder and voila!