A project to learn NodeJS, ExpressJS, and whatever else along the way.
Go to file
Robert McGovern 39a3843c56 added config so can specify location of browser, mostly for arm linux where the version that came with puppeteer didn't load 2024-03-07 11:11:22 +00:00
views worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00
www/assets worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00
.gitignore base code set to use import rather than require. Now to evolve the code 2024-03-06 12:18:36 +00:00
LICENSE Initial commit 2024-03-06 12:36:54 +01:00
README.md worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00
express-puppeteer.js added base files, plus og experiment node script that uses commonjs not modules 2024-03-06 11:48:48 +00:00
generate-image-of-page.mjs made copy of page, don't ask 2024-03-06 12:53:09 +00:00
image-generator.cjs added config so can specify location of browser, mostly for arm linux where the version that came with puppeteer didn't load 2024-03-07 11:11:22 +00:00
index.mjs worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00
package-lock.json worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00
package.json worker now takes provides parameters, and then uses ejs to render the webpage. At the moment that is basic CSS styling, and no provided parameters for the colors and such YET 2024-03-07 10:49:55 +00:00

README.md

motivational-picture-generator

A project to learn NodeJS, ExpressJS, and whatever else along the way.

THIS IS ALL WORK IN PROGRESS AND SUBJECT TO CHANGE

To start server

npm run dev

Make url request to localhost:4000 with. Not providing all the parameters will cause the render to fail.

wget --output-document screenshot.png 'http://localhost:4200/submit/mpgParams?title=A Motivational Poster&sentence=something pithy&imageWidth=450px&imageUrl=https://picsum.photos/seed/1709802270038/300/300'

Testing with

ab -c 5 -t 15 http://localhost:4000/submit/\{\}